Include http status on rest fetch failure

This commit is contained in:
schroda
2025-01-26 03:30:35 +01:00
parent 2a4afd642d
commit a56fd08bf6

View File

@@ -70,7 +70,7 @@ export class RestClient
}
if (result.status !== 200) {
throw new Error(result.statusText);
throw new Error(`status ${result.status}: ${result.statusText}`);
}
if (checkResponseIsJson && result.headers.get('content-type') !== 'application/json') {