mirror of
https://github.com/graphql-hive/console
synced 2026-05-24 09:38:26 +00:00
More insights from CDN Worker (#5558)
This commit is contained in:
parent
42b48708b2
commit
8b04c7adef
2 changed files with 9 additions and 2 deletions
|
|
@ -197,9 +197,12 @@ export const createArtifactRequestHandler = (deps: ArtifactRequestHandler) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
breadcrumb('Reading response.text()');
|
||||||
|
const text = await result.response.text();
|
||||||
|
breadcrumb('Returning OK 200');
|
||||||
return createResponse(
|
return createResponse(
|
||||||
analytics,
|
analytics,
|
||||||
await result.response.text(),
|
text,
|
||||||
{
|
{
|
||||||
status: 200,
|
status: 200,
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
||||||
|
|
@ -257,6 +257,8 @@ export class ArtifactStorageReader {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.breadcrumb(`Response status: ${response.status}`);
|
||||||
|
|
||||||
if (response.status === 404) {
|
if (response.status === 404) {
|
||||||
return { type: 'notFound' } as const;
|
return { type: 'notFound' } as const;
|
||||||
}
|
}
|
||||||
|
|
@ -276,7 +278,9 @@ export class ArtifactStorageReader {
|
||||||
|
|
||||||
this.breadcrumb(`Failed to read artifact`);
|
this.breadcrumb(`Failed to read artifact`);
|
||||||
|
|
||||||
const body = await response.text();
|
const body = await response
|
||||||
|
.text()
|
||||||
|
.catch(error => 'Failed to read response body due to ' + String(error));
|
||||||
throw new Error(`GET request failed with status ${response.status}: ${body}`);
|
throw new Error(`GET request failed with status ${response.status}: ${body}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue