Browse Source
Merge pull request #17373 from abpframework/fix-error-handler
if user does not defined skiped error, error handler should work
pull/17429/head
Mahmut Gundogdu
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
2 deletions
-
npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts
|
|
|
@ -89,9 +89,10 @@ export class ErrorHandler { |
|
|
|
|
|
|
|
protected filterRestErrors = ({ status }: HttpErrorResponse): boolean => { |
|
|
|
if (typeof status !== 'number') return false; |
|
|
|
|
|
|
|
if(!this.httpErrorConfig.skipHandledErrorCodes){ |
|
|
|
return true; |
|
|
|
} |
|
|
|
return ( |
|
|
|
!!this.httpErrorConfig.skipHandledErrorCodes && |
|
|
|
this.httpErrorConfig.skipHandledErrorCodes.findIndex(code => code === status) < 0 |
|
|
|
); |
|
|
|
}; |
|
|
|
|