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

Dicomtrolley does not handle valid http 204 - No Content #47

Closed
sjoerdk opened this issue Sep 14, 2023 · 0 comments
Closed

Dicomtrolley does not handle valid http 204 - No Content #47

sjoerdk opened this issue Sep 14, 2023 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@sjoerdk
Copy link
Owner

sjoerdk commented Sep 14, 2023

  • dicomtrolley version: 3.0.2
  • Python version: 3.9

Description

For queries that return no results, a DICOM-web server should return http 204 (No Content). See DICOM docs here:
https://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_8.3.4.4.html

This is not handled in dicomtrolley.
Currently this happens:

trolley.find_studies(Query(PatientName="NonExistingPatient"))
>>> dicomtrolley.exceptions.DICOMTrolleyError: Calling <server_url> failed (204 - No Content)
        response content was b''

Instead the exception should be caught and an empty list should be returned:

trolley.find_studies(Query(PatientName="NonExistingPatient"))
[]
@sjoerdk sjoerdk added bug Something isn't working enhancement New feature or request labels Sep 14, 2023
sjoerdk added a commit that referenced this issue Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant