Browse Source

Remove error Response type check (#731)

* Remove error Response type check

Minimization is impacting type checking in a non-consistent way.
The previous type check works locally,
but not from build artifacts 🤷. We only set `captchaRequired` on
our errors when we want a resubmit with captcha included, so we're safe
keying off that

* linter
pull/735/head
Matt Gibson 4 years ago committed by GitHub
parent
commit
f88515745c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      angular/src/directives/api-action.directive.ts

5
angular/src/directives/api-action.directive.ts

@ -31,10 +31,7 @@ export class ApiActionDirective implements OnChanges { @@ -31,10 +31,7 @@ export class ApiActionDirective implements OnChanges {
(e: any) => {
this.el.nativeElement.loading = false;
if (
(e instanceof ErrorResponse || e.constructor.name === ErrorResponse.name) &&
(e as ErrorResponse).captchaRequired
) {
if ((e as ErrorResponse).captchaRequired) {
this.logService.error("Captcha required error response: " + e.getSingleMessage());
return;
}

Loading…
Cancel
Save