Showing the changes to packages (1 of 4 files). Show all
Unified · Split
| @@ -1116,9 +1116,14 @@ const invokeGraphqlHttpRequest = (input: GraphqlHttpInvocation) => · 1115 unmodified lines | ||
| 1116 | 1116 | catch: (cause) => graphqlToolError(`Failed decoding GraphQL response for ${input.path}`, cause), |
| 1117 | 1117 | }); |
| 1118 | 1118 | |
| 1119 | + const responseHeaders: Record<string, string> = {}; | |
| 1120 | + response.headers.forEach((value, key) => { | |
| 1121 | + responseHeaders[key] = value; | |
| 1122 | + }); | |
| 1123 | + | |
| 1119 | 1124 | return { |
| 1120 | 1125 | status: response.status, |
| 1121 | − headers: sanitizeResponseHeaders(Object.fromEntries(response.headers)), | |
| 1126 | + headers: sanitizeResponseHeaders(responseHeaders), | |
| 1122 | 1127 | body, |
| 1123 | 1128 | isError: response.status >= 400 || hasGraphqlErrors(body), |
| 1124 | 1129 | }; |