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

Wrong error shown when conversion fails #714

Closed
apyrgio opened this issue Feb 15, 2024 · 0 comments · Fixed by #717
Closed

Wrong error shown when conversion fails #714

apyrgio opened this issue Feb 15, 2024 · 0 comments · Fixed by #717
Labels
bug Something isn't working container
Milestone

Comments

@apyrgio
Copy link
Contributor

apyrgio commented Feb 15, 2024

(original message from @deeplow here: #704 (comment))

While testing on ubuntu, I noticed that interrupted conversions (sample_bad...) show a traceback instead of simply an error message. We should show an error message:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dangerzone/isolation_provider/base.py", line 74, in convert
    self.doc_to_pixels(document, t)
  File "/usr/lib/python3/dist-packages/dangerzone/isolation_provider/base.py", line 106, in doc_to_pixels
    n_pages = read_int(p.stdout)
  File "/usr/lib/python3/dist-packages/dangerzone/isolation_provider/base.py", line 38, in read_int
    raise errors.InterruptedConversionException()
dangerzone.conversion.errors.InterruptedConversionException: Something interrupted the conversion and it could not be completed.
@apyrgio apyrgio added bug Something isn't working container labels Feb 15, 2024
@apyrgio apyrgio added this to the 0.6.0 milestone Feb 15, 2024
apyrgio added a commit that referenced this issue Feb 15, 2024
When we get an early EOF from the converter process, we should
immediately get the exit code of that process, to find out the actual
underlying error. Currently, the exception we raise masks the underlying
error.

Raise a ConverterProcException, that in turns makes our error handling
code read the exit code of the spawned process, and converts it to a
helpful error message.

Fixes #714
apyrgio added a commit that referenced this issue Feb 15, 2024
When we get an early EOF from the converter process, we should
immediately get the exit code of that process, to find out the actual
underlying error. Currently, the exception we raise masks the underlying
error.

Raise a ConverterProcException, that in turns makes our error handling
code read the exit code of the spawned process, and converts it to a
helpful error message.

Fixes #714
apyrgio added a commit that referenced this issue Feb 19, 2024
When we get an early EOF from the converter process, we should
immediately get the exit code of that process, to find out the actual
underlying error. Currently, the exception we raise masks the underlying
error.

Raise a ConverterProcException, that in turns makes our error handling
code read the exit code of the spawned process, and converts it to a
helpful error message.

Fixes #714
apyrgio added a commit that referenced this issue Feb 19, 2024
When we get an early EOF from the converter process, we should
immediately get the exit code of that process, to find out the actual
underlying error. Currently, the exception we raise masks the underlying
error.

Raise a ConverterProcException, that in turns makes our error handling
code read the exit code of the spawned process, and converts it to a
helpful error message.

Fixes #714
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working container
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant