Polishing#9
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fb4e06a. Configure here.
| } else { | ||
| "-".to_string() | ||
| }; | ||
| let tagged = format!("[{kind}|{status_s}|{body_len}]{msg}\u{001f}{body_s}"); |
There was a problem hiding this comment.
Trailing \x1f control character in Node.js error messages
Medium Severity
The Rust format! on line 34 unconditionally appends \u{001f} (unit separator) even when body_s is empty (for Config, Http, Timeout, Connect variants). On the JS side, fromNapiError only strips the separator when bodyLenStr !== "-", so non-body error variants end up with a trailing \x1f control character in their .message. This pollutes user-facing error messages and can break string comparisons, JSON serialization, and log output.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit fb4e06a. Configure here.


Note
Medium Risk
Touches error propagation and exception surfaces across Rust, Python, Node, and Ruby; mistakes could change how failures are classified or break consumer error-handling expectations, though changes are localized to mapping/wrapper layers and examples.
Overview
Introduces a typed, cross-language error hierarchy for the SDK, expanding core
SdkErrorhandling withUrlParse/Configsurfacing and a newHttpKindclassifier (Timeout/Connect/Other) to consistently categorize transport failures.Bindings are updated to map
SdkErrorinto language-native subclasses (Python/Ruby exception classes withstatus/bodymetadata; Node via taggednapi::Errormessages parsed and rethrown by a new JS wrapper + Proxy that wraps all client methods). Documentation and examples across Rust/Python/Node/Ruby are updated to demonstrate catching specific errors, and small e2e/example tweaks adjust rate-limit/test timing behavior.Reviewed by Cursor Bugbot for commit 11adbb4. Bugbot is set up for automated code reviews on this repo. Configure here.