We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d64982 commit 99074f8Copy full SHA for 99074f8
src/common/atlas/apiClient.ts
@@ -62,7 +62,13 @@ export class ApiClient {
62
private errorMiddleware = (): Middleware => ({
63
async onResponse({ response }) {
64
if (!response.ok) {
65
- throw new ApiClientError(`Error calling Atlas API: ${await response.text()}`, response);
+ try {
66
+ const text = await response.text();
67
+ throw new ApiClientError(`Error calling Atlas API: [${response.statusText}] ${text}`, response);
68
+ }
69
+ catch {
70
+ throw new ApiClientError(`Error calling Atlas API: ${response.statusText}`, response);
71
72
}
73
},
74
});
0 commit comments