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

unhelpful error for defective images #63

Open
FND opened this issue Feb 3, 2023 · 0 comments
Open

unhelpful error for defective images #63

FND opened this issue Feb 3, 2023 · 0 comments

Comments

@FND
Copy link
Contributor

FND commented Feb 3, 2023

Trying to convert a bunch of JPGs resulted in

node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^
[Error: Input file contains unsupported image format]

That's not particularly helpful. Turns out one of those images is defective, so we're missing a catch here for unexpected errors. We'd mostly need to annotate the respective file name for diagnosis, but I didn't want to discard more specific errors from within the respective function. I guess we should start using error codes or custom error classes?

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

No branches or pull requests

1 participant