File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -18,15 +18,16 @@ declare module '@ioc:Adonis/Core/HttpExceptionHandler' {
18
18
export default abstract class HttpExceptionHandler {
19
19
constructor ( logger : LoggerContract )
20
20
protected logger : LoggerContract
21
- protected dontReport : string [ ]
21
+ protected ignoreCodes : string [ ]
22
22
protected ignoreStatuses : number [ ]
23
- protected internalDontReport : string [ ]
23
+ protected internalIgnoreCodes : string [ ]
24
24
protected statusPages : { [ key : string ] : string }
25
25
public expandedStatusPages : { [ key : string ] : string }
26
26
protected disableStatusPagesInDevelopment : boolean
27
27
protected context ( ctx : HttpContextContract ) : any
28
28
protected shouldReport ( error : any ) : boolean
29
29
protected makeJSONResponse ( error : any , ctx : HttpContextContract ) : Promise < void >
30
+ protected makeJSONAPIResponse ( error : any , ctx : HttpContextContract ) : Promise < void >
30
31
protected makeHtmlResponse ( error : any , ctx : HttpContextContract ) : Promise < void >
31
32
public report ( error : any , ctx : HttpContextContract ) : void
32
33
public handle ( error : any , ctx : HttpContextContract ) : Promise < any >
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ const encryption = new Encryption('verylongandrandom32characterskey')
27
27
test . group ( 'HttpExceptionHandler' , ( ) => {
28
28
test ( 'do not report error if error code is in ignore list' , ( assert ) => {
29
29
class AppHandler extends HttpExceptionHandler {
30
- protected dontReport = [ 'E_BAD_REQUEST' ]
30
+ protected ignoreCodes = [ 'E_BAD_REQUEST' ]
31
31
}
32
32
33
33
const logger = new FakeLogger ( loggerConfig )
You can’t perform that action at this time.
0 commit comments