`piexif.dump` errors are not safely handled
sarayourfriend opened this issue · 2 comments
sarayourfriend commented
Sentry link
https://sentry.io/share/issue/a80d52de7f89436586ed0250cd0a32d2/
Description
The call to piexif.dump
should be wrapped in a try/except
to prevent these errors in the watermark endpoint.
Reproduction
Visit https://api-dev.openverse.engineering/v1/images/a913fde1-d524-4059-bd4f-9bd687578cc3/watermark/ to see an example of this failure.
AetherUnbound commented
Closing this in favor of #827, as both Sentry errors are manifestations of the same issue. I'll also merge the Sentry issues together.
krysal commented
We're not catching all the exceptions on this code block so reopening.
openverse-api/api/catalog/api/utils/watermark.py
Lines 157 to 170 in 6b7e963