Skip to content

Commit

Permalink
refactor: rename dontReport to ignoreCodes
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Feb 29, 2020
1 parent c5b9f80 commit 182f6db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/HttpExceptionHandler/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export abstract class HttpExceptionHandler {
/**
* An array of error codes that must not be reported
*/
protected dontReport: string[] = []
protected ignoreCodes: string[] = []

/**
* An array of http statuses that must not be reported. The first
Expand All @@ -32,7 +32,7 @@ export abstract class HttpExceptionHandler {
* An array of internal error codes to ignore
* from the reporting list
*/
protected internalDontReport: string[] = [
protected internalIgnoreCodes: string[] = [
'E_ROUTE_NOT_FOUND',
]

Expand Down Expand Up @@ -85,7 +85,7 @@ export abstract class HttpExceptionHandler {
/**
* Don't report when error has a code and it's in the ignore list.
*/
if (error.code && this.dontReport.concat(this.internalDontReport).indexOf(error.code) > -1) {
if (error.code && this.ignoreCodes.concat(this.internalIgnoreCodes).indexOf(error.code) > -1) {
return false
}

Expand Down

0 comments on commit 182f6db

Please sign in to comment.