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