Skip to content

Commit 655ab05

Browse files
committed
fix: add error logging for failed JSON parsing in AltimateHttpClient
1 parent 17f55b0 commit 655ab05

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/services/altimateHttpClient.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,12 @@ export class AltimateHttpClient {
272272
let jsonResponse: any;
273273
try {
274274
jsonResponse = JSON.parse(textResponse);
275-
} catch {}
275+
} catch (error) {
276+
this.dbtTerminal.debug(
277+
"AltimateHttpClient",
278+
`Failed to parse error response as JSON: ${error instanceof Error ? error.message : String(error)}. Raw response: ${textResponse.substring(0, 200)}${textResponse.length > 200 ? "..." : ""}`,
279+
);
280+
}
276281

277282
throw new APIError(
278283
`Could not process request, server responded with ${response.status}: ${jsonResponse?.detail || textResponse}`,

0 commit comments

Comments
 (0)