diff --git a/angular/src/directives/api-action.directive.ts b/angular/src/directives/api-action.directive.ts index f6118f7b7f7..d45c9b87f06 100644 --- a/angular/src/directives/api-action.directive.ts +++ b/angular/src/directives/api-action.directive.ts @@ -31,7 +31,7 @@ export class ApiActionDirective implements OnChanges { }, (e: any) => { this.el.nativeElement.loading = false; - if (e instanceof ErrorResponse && (e as ErrorResponse).captchaRequired) { + if ((e instanceof ErrorResponse || e.constructor.name === 'ErrorResponse') && (e as ErrorResponse).captchaRequired) { this.logService.error('Captcha required error response: ' + e.getSingleMessage()); return; }