Skip to content

feat: add error handling#47

Merged
zvikagart merged 7 commits intomainfrom
error-messages
Aug 5, 2025
Merged

feat: add error handling#47
zvikagart merged 7 commits intomainfrom
error-messages

Conversation

@jake-valsamis
Copy link
Contributor

No description provided.

This comment was marked as outdated.

@zvikagart zvikagart requested a review from Copilot July 18, 2025 13:52

This comment was marked as outdated.

zvikagart and others added 5 commits July 21, 2025 10:55
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@zvikagart zvikagart requested a review from Copilot August 5, 2025 13:57
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 adds comprehensive error handling to the CodeOcean client library by introducing a custom Error exception class that enhances HTTP errors with additional context from API responses.

  • Introduces a new Error exception class that wraps requests.HTTPError with enhanced error information
  • Integrates the error handler into the client's response processing pipeline
  • Exposes the Error class in the public API through the main module

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/codeocean/error.py Implements the new Error exception class with JSON response parsing and formatted string representation
src/codeocean/client.py Integrates custom error handling into the HTTP client response pipeline
src/codeocean/init.py Exports the Error class for public API usage
tests/test_error.py Comprehensive test suite covering all Error class functionality and edge cases

@zvikagart zvikagart merged commit 3c7e64c into main Aug 5, 2025
1 check passed
@zvikagart zvikagart deleted the error-messages branch August 5, 2025 14:01
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.

3 participants