Error Response Format
When a request fails, you receive an error response:partialResult field may contain useful information even when the request fails, such as partial token data or pool information.
Both transports share this envelope
The success and error envelope is identical on Socket.IO and HTTP. A successful response always hassuccess: true and a result field; responses may also include optional rateLimit and serverTimings objects.
Over Socket.IO, the response arrives on the event you emitted. Over HTTP, the same JSON is returned in the response body, and the HTTP status code reflects the outcome:
Even on a
400 or 500, the body still follows the error envelope above, so you can read error.code and error.message the same way on both transports.
Common Error Codes
Connection Errors
Request Errors
Trading Errors
Transaction Errors
Handling Errors
TypeScript
Python
Retry Strategy
For transient errors, implement exponential backoff:Debugging Tips
- Check the console - Log full responses to see error details
- Use the playground - Test requests interactively at /playground
- Validate addresses - Ensure addresses are correct for the target chain
- Check token contract - Some tokens have transfer restrictions
- Monitor connection - Ensure WebSocket connection is stable
Getting Help
If you encounter persistent errors:- Note the error code and message
- Capture the full request parameters
- Contact us at info@chainworks.co

