web/admin: fully remove response cloning due to errors
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
e6b515e3f7
commit
602aed674b
|
@ -33,16 +33,8 @@ export function configureSentry(canDoPpi: boolean = false): Promise<Config> {
|
|||
}
|
||||
}
|
||||
if (hint.originalException instanceof Response) {
|
||||
const response = hint.originalException as Response;
|
||||
// We only care about server errors
|
||||
if (response.status < 500) {
|
||||
return null;
|
||||
}
|
||||
// Need to clone the response, otherwise the .text() and .json() can't be re-used
|
||||
const resCopy = response.clone();
|
||||
const body = await resCopy.json();
|
||||
event.message = `${response.status} ${response.url}: ${JSON.stringify(body)}`
|
||||
}
|
||||
if (event.exception) {
|
||||
me().then(user => {
|
||||
Sentry.showReportDialog({
|
||||
|
|
Reference in New Issue