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 f654498 commit 690fe91Copy full SHA for 690fe91
src/httpClient/httpURLConnectionClient.ts
@@ -184,10 +184,16 @@ class HttpURLConnectionClient implements ClientInterface {
184
exception = getException(response.body);
185
}
186
} catch (e) {
187
- reject(exception);
188
- } finally {
189
+ // parsing error
+ exception = new HttpClientException({
+ message: `HTTP Exception: ${response.statusCode}. Error parsing response: ${(e as Error).message}`,
190
+ statusCode: response.statusCode,
191
+ responseHeaders: response.headers,
192
+ responseBody: response.body,
193
+ });
194
195
+
196
+ return reject(exception);
197
198
199
resolve(response.body as string);
0 commit comments