Skip to content

Conversation

@tanut32039
Copy link
Contributor

Implementation details

  • show more log detail

Please ensure the following requirements are met before submitting a pull request:

  • The pull request is targeted against the correct target branch
  • The pull request is linked to an issue with appropriate discussion and an accepted design OR is linked to a spec that describes the work.
  • The pull request includes a description of the implementation/work done in detail.
  • The pull request includes any appropriate unit/integration tests
  • You have added a relevant changelog entry to CHANGELOG.md
  • You have re-reviewed the files affected by the pull request (e.g. using the Files changed tab in the GitHub PR explorer)

@tanut32039 tanut32039 changed the base branch from main to band-source November 11, 2025 10:56
Copy link

Copilot AI left a 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 ProviderError from 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.

@bandprotocol bandprotocol deleted a comment from Copilot AI Nov 12, 2025
Copy link

Copilot AI left a 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.

Copy link

Copilot AI left a 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.

Tanut Lertwarachai added 2 commits November 13, 2025 15:08
Base automatically changed from band-source to main November 13, 2025 10:26
@RogerKSI RogerKSI merged commit f85e3a4 into main Nov 14, 2025
3 checks passed
@RogerKSI RogerKSI deleted the log-error-detail branch November 14, 2025 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants