Fix error handling pillow errors
Fix error handling pillow errors

https://sentry.io/organizations/dimagi/issues/1292223056/?project=136860&query=is%3Aunresolved

dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq