-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
84 - HTTP Error code handling 400+ (#87)
* feat: Enhance HTTP client error handling with custom exceptions - Implement hierarchical exception system with base NHLApiException - Add specific exceptions for common HTTP status codes (404, 429, 400, 401, 5xx) - Create centralized error handling in _handle_response method - Add comprehensive test suite with pytest for all error scenarios - Improve error message formatting to include both request context and API response - Handle edge cases for malformed JSON and non-JSON responses - Add type checking for response parsing Tests cover: - All HTTP error status codes - Success responses - Non-JSON responses - Malformed JSON handling - Query parameter handling - Verbose logging behavior Breaking changes: None - extends existing error handling functionality Closes #81 * README bugfix * Fix: stats.team_summary() double encoding issue in notebooks
- Loading branch information
Showing
7 changed files
with
256 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters