Skip to content

Commit d20b414

Browse files
committed
chore: improve error message tracing
1 parent 5a48f52 commit d20b414

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/request/src/fetch.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ const Fetch = {
153153
? errorPayload.errors
154154
: null;
155155

156-
const msg = `[${response.status}] ${response.statusText ? response.statusText + ' ' : ''}- ${response.url}`;
156+
const msg = `[${context.request.method ?? 'GET'} ${response.status}] (${response.type}) ${
157+
response.statusText ? response.statusText + ' ' : ''
158+
}- ${response.url}`;
157159

158160
const error = (errors ? new AggregateError(errors, msg) : new Error(msg)) as Error & {
159161
content: object | undefined;

0 commit comments

Comments
 (0)