Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fairmint/canton-node-sdk",
"version": "0.0.127",
"version": "0.0.192",
"description": "Canton Node SDK",
"keywords": [
"canton",
Expand Down
5 changes: 5 additions & 0 deletions src/core/http/HttpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ export class HttpClient {
}
}

// Non-standard bodies (e.g. reverse-proxy "404 page not found") rarely include Canton fields; the URL is the best repro hint.
if (error.config?.url) {
msg += ` [request: ${error.config.method ?? 'GET'} ${error.config.url}]`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Axios method is lowercase, inconsistent with uppercase fallback

Low Severity

Axios normalizes config.method to lowercase internally (e.g. 'get', 'post'), so this will produce messages like [request: get https://…] instead of the conventional uppercase form. The uppercase 'GET' fallback reveals the intent was to display methods in uppercase, but .toUpperCase() is missing on error.config.method, creating an inconsistency between the normal and fallback paths.

Fix in Cursor Fix in Web

}

return new ApiError(msg, status, error.response?.statusText, data);
}
return new NetworkError(`Request failed: ${error instanceof Error ? error.message : String(error)}`);
Expand Down
Loading