ArtifexSoftware / mupdf.js

JavaScript bindings for MuPDF
https://mupdfjs.readthedocs.io
GNU Affero General Public License v3.0
318 stars 17 forks source link

REST server should catch exceptions from WASM #73

Closed ccxvii closed 3 weeks ago

ccxvii commented 2 months ago

Each API call should really be wrapped in a try/catch to return a user friendly HTTP status code and error message if there's an exception in the mupdf library.

For example opening a file that is corrupt, or not a PDF file, or loading a page that is out of range, etc.