diff --git a/npm/ng-packs/packages/theme-shared/src/lib/services/status-code-error-handler.service.ts b/npm/ng-packs/packages/theme-shared/src/lib/services/status-code-error-handler.service.ts index 35239819bf..976bb11702 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/services/status-code-error-handler.service.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/services/status-code-error-handler.service.ts @@ -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 {