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

Unify exceptions between web and file clients #69

Merged
merged 4 commits into from
Sep 7, 2022

Conversation

hackermd
Copy link
Collaborator

@hackermd hackermd commented Aug 21, 2022

This PR introduces changes to unify exceptions between DICOMwebClient and DICOMfileClient. Specifically, it ensures that errors that would result in requests.HTTPError exceptions in DICOMwebClient are handled the same way by DICOMfileClient, including HTTP status codes to differentiate between client (4XX) and server (5XX) errors.

It is a bit weird for DICOMfileClient to raise requests.HTTPError, because the client does not rely on HTTP. Ultimately, it would probably be nice to fully abstract the error handling logic via a custom exception class. However, that would break existing behavior of the DICOMwebClient. It's something we could consider for version 1.0.

@hackermd hackermd added the enhancement New feature or request label Aug 21, 2022
@hackermd hackermd requested a review from cgorman August 21, 2022 19:13
@hackermd hackermd self-assigned this Aug 21, 2022
@hackermd hackermd removed the request for review from cgorman September 7, 2022 13:05
@hackermd hackermd merged commit 0b36f54 into master Sep 7, 2022
@hackermd hackermd deleted the enhancement/file-client-error-handling branch September 7, 2022 13:25
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.

1 participant