Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Handle invalid email address in IMAP channel #9450

Merged
merged 1 commit into from May 10, 2024

Conversation

sojan-official
Copy link
Member

We have observed in Sentry that sometimes fetch_imap_emails_jobs fails with a validation error when creating a contact. This happens when the original_sender isn't in a format supported by the Chatwoot contact model schema. Chatwoot validates contacts email with Device.email_regexp.

This PR will skip processing such emails. It also adds a log for each email processed in the email fetch job and an error for the ones we skip.

Fixes: https://linear.app/chatwoot/issue/CW-3295/activerecordrecordinvalid-validation-failed-email-invalid-email

@vishnu-narayanan vishnu-narayanan temporarily deployed to chatwoot-pr-9450 May 10, 2024 02:38 Inactive
@scmmishra scmmishra merged commit 4284c12 into develop May 10, 2024
15 checks passed
@scmmishra scmmishra deleted the chore/CW-3295-invalid-email branch May 10, 2024 03:25
Copy link

sentry-io bot commented May 13, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ ActionController::UrlGenerationError: No route matches {:action=>"show", :controller=>"active_storage/blobs/redirect", :filename=>#<Act... Sidekiq/Inboxes::FetchImapEmailsJob View Issue

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants