unhelpful error for defective images
FND opened this issue · comments
FND commented
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?