-
Notifications
You must be signed in to change notification settings - Fork 1
[Feat] Log error detail #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances error logging across all Bothan exchange integration modules by adding detailed contextual information to error messages. When errors occur during WebSocket message parsing, HTTP requests, or price data conversion, the system now logs the actual problematic values, making debugging significantly easier.
Key changes:
- Converted simple error enum variants to struct variants containing contextual data (messages, symbols, prices, etc.)
- Updated error handling to capture and include problematic data in error messages before attempting operations that might fail
- Moved
ProviderErrorfrom worker modules to api modules in some integrations for better organization
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| bothan-okx/src/api/websocket.rs | Added message content and symbol/price context to parse errors |
| bothan-okx/src/api/error.rs | Enhanced error variants with contextual fields (msg, symbol, price) |
| bothan-kraken/src/api/websocket.rs | Added message content and symbol/price context to parse errors |
| bothan-kraken/src/api/error.rs | Enhanced error variants with contextual fields, removed unused error variant |
| bothan-htx/src/api/websocket.rs | Added message content, channel ID, and symbol/price context to errors |
| bothan-htx/src/api/error.rs | Enhanced error variants with contextual fields |
| bothan-coinmarketcap/src/api/rest.rs | Improved HTTP error handling with request/response details, moved ProviderError import |
| bothan-coinmarketcap/src/api/error.rs | Enhanced error variants for better request/response tracking |
| bothan-coingecko/src/api/rest.rs | Improved HTTP error handling with resource and response details |
| bothan-coingecko/src/api/error.rs | Enhanced error variants for HTTP and parse errors |
| bothan-coinbase/src/api/websocket.rs | Added message content and symbol/price context to parse errors |
| bothan-coinbase/src/api/error.rs | Enhanced error variants with contextual fields |
| bothan-bybit/src/api/websocket.rs | Added message content and symbol/price context to parse errors |
| bothan-bybit/src/api/error.rs | Enhanced error variants with contextual fields |
| bothan-bitfinex/src/api/rest.rs | Improved HTTP error handling with request/response details |
| bothan-bitfinex/src/api/error.rs | Enhanced error variants for better request/response tracking |
| bothan-binance/src/api/websocket.rs | Added message content and symbol/price context to parse errors |
| bothan-binance/src/api/error.rs | Enhanced error variants with contextual fields |
| bothan-band/src/api/rest.rs | Improved HTTP error handling, optimized string operations |
| bothan-band/src/api/error.rs | Enhanced error variants with contextual fields for signals and prices |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 36 out of 37 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 38 out of 39 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Implementation details
Please ensure the following requirements are met before submitting a pull request:
CHANGELOG.mdFiles changedtab in the GitHub PR explorer)