scanner / as_email_service

A Django app and smtp relay service for working with 3rd party email services and asimap
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

In generating external pw file: EmailAccount.DoesNotExist: EmailAccount matching query does not exist. #123

Closed scanner closed 7 months ago

scanner commented 7 months ago

https://apricot-systematic.sentry.io/issues/4923555030/?alert_rule_id=14754796&alert_timestamp=1706490342864&alert_type=email&environment=production&notification_uuid=fee56b4e-9cd4-4477-a3df-2f811b80429d&project=4506107525005312&referrer=alert_email

Specifically: https://github.com/scanner/as_email_service/blob/70c971e26a70488fac9abafb9c9d20ca6c6d8a95/app/as_email/tasks.py#L532

This was after setting up a new server. Likely a problem happened while auto-creating the default email accounts for a server.

scanner commented 7 months ago

NOTE: huey task works if I try to update the email account later.. we should be called in the post_save hook so the account should exist.

Also some of the pw entry creations worked. So maybe it was too many at once trying to access the sqlite db?

scanner commented 7 months ago

For now, attempting to create the pw entry at a later time is fine so we will catch the exception, log a warning and exit.