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
parent
commit
3ea116f0cf
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts

5
npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts

@ -89,9 +89,10 @@ export class ErrorHandler {
protected filterRestErrors = ({ status }: HttpErrorResponse): boolean => { protected filterRestErrors = ({ status }: HttpErrorResponse): boolean => {
if (typeof status !== 'number') return false; if (typeof status !== 'number') return false;
if(!this.httpErrorConfig.skipHandledErrorCodes){
return true;
}
return ( return (
!!this.httpErrorConfig.skipHandledErrorCodes &&
this.httpErrorConfig.skipHandledErrorCodes.findIndex(code => code === status) < 0 this.httpErrorConfig.skipHandledErrorCodes.findIndex(code => code === status) < 0
); );
}; };

Loading…
Cancel
Save