Skip to content
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

Feature/2 error handling improvement #8

Merged
merged 6 commits into from
Feb 23, 2024

Conversation

albertviilik
Copy link
Owner

Features and Improvements:

  • Error Handling Enhancements: Implemented specific exceptions for API key and rate limit errors (ApiKeyException and RateLimitException) to improve clarity in error messaging and debugging processes.
  • Logging Adjustments: Refined logging messages across TheOddsApi and NetworkService classes, transitioning some messages from info to debug level to reduce log verbosity under normal operation.

The logging level for sending a GET request, adding headers to the request, and successful requests in the NetworkService class have been changed from info to debug level. This change will ensure that these actions are only logged under debug settings, reducing the volume of logs under normal circumstances.
The logging levels and messages in `TheOddsApi` class have been adjusted to increase clarity and informativeness. Furthermore, the `JsonSyntaxException` has been imported for potential future use. The changes mainly transition `info` level logging messages to `debug` level with more descriptive messaging, providing better visibility during debugging.
Updated the NetworkService to throw specific exceptions for API key errors and rate limit errors. Further added the necessary exception classes (ApiKeyException and RateLimitException) for clean error handling. This improves the debugging process by providing clear error messages.
Updated the NetworkService to throw specific exceptions for API key errors and rate limit errors. Further added the necessary exception classes (ApiKeyException and RateLimitException) for clean error handling. This improves the debugging process by providing clear error messages.
The import for JsonSyntaxException in TheOddsApi.java has been removed as it is not utilized in the file. This is part of a general clean-up to reduce unnecessary code and improve code readability.
@albertviilik albertviilik linked an issue Feb 22, 2024 that may be closed by this pull request
@albertviilik albertviilik added the enhancement New feature or request label Feb 22, 2024
@albertviilik albertviilik merged commit 71fc8f3 into main Feb 23, 2024
@albertviilik albertviilik deleted the feature/2-error-handling-improvement branch February 23, 2024 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error Handling Improvement
2 participants