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,10 +30,10 @@ export class TokenCopyButton extends ActionButton {
|
|||
}, 1500);
|
||||
});
|
||||
}).catch((err: Response) => {
|
||||
return err.json();
|
||||
}).then(errResp => {
|
||||
return err.json().then(errResp => {
|
||||
throw new Error(errResp["detail"]);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Reference in New Issue