Merge pull request #17983 from abpframework/issue/17982

fix canHandle method to correctly handle error status code
pull/17987/head
Masum ULU 2 years ago committed by GitHub
commit 781a222399
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -57,9 +57,9 @@ export class StatusCodeErrorHandlerService implements CustomHttpErrorHandlerServ
this.createErrorComponentService.execute(instance);
}
canHandle({ status }): boolean {
this.status = status || 0;
return this.handledStatusCodes.indexOf(status) > -1;
canHandle(error): boolean {
this.status = error?.status || 0;
return this.handledStatusCodes.indexOf(this.status) > -1;
}
execute(): void {

Loading…
Cancel
Save