diff --git a/web/src/elements/buttons/TokenCopyButton.ts b/web/src/elements/buttons/TokenCopyButton.ts index 9bd88632d..a8dedf347 100644 --- a/web/src/elements/buttons/TokenCopyButton.ts +++ b/web/src/elements/buttons/TokenCopyButton.ts @@ -30,9 +30,9 @@ export class TokenCopyButton extends ActionButton { }, 1500); }); }).catch((err: Response) => { - return err.json(); - }).then(errResp => { - throw new Error(errResp["detail"]); + return err.json().then(errResp => { + throw new Error(errResp["detail"]); + }); }); }