-
Notifications
You must be signed in to change notification settings - Fork 26
Labels
Description
This is our most common error on Sentry
https://muckrock.sentry.io/issues/6864839790/?project=996&query=is%3Aunresolved&referrer=issue-stream&sort=freq
A link to the start of the method:
muckrock/muckrock/foia/tasks.py
Line 1060 in 2a6acaf
| def foia_send_email(foia_pk, comm_pk, options, **kwargs): |
Error message: UnicodeEncodeError
'utf-8' codec can't encode characters in position 127-129: surrogates not allowed
Inside of foia_send_email we call send_delayed_email
muckrock/muckrock/foia/models/request.py
Line 888 in 2a6acaf
| def send_delayed_email(self, comm, **kwargs): |
In this function we probably need to sanitize the email subject and body before sending so that it doesn't fail