web/elements: fix TokenCopyButton error case
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
335c5a0b80
commit
fb53dc826a
|
@ -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"]);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue