When an IMAP server returns malformed or partial protocol responses, Inboxes::FetchImapEmailsJob can raise Net::IMAP::ResponseParseError, Net::IMAP::ResponseReadError, or Net::IMAP::ResponseTooLargeError. Previously these errors fell through to the generic StandardError handler and were captured repeatedly in Sentry. This PR updates app/jobs/inboxes/fetch_imap_emails_job.rb to treat those parser/read exceptions as handled IMAP failures by adding them to the existing IMAP/network rescue block, so they are logged and retried on the next scheduled run without exception tracking noise. fixes: https://chatwoot-p3.sentry.io/issues/7132037793/events/104fb9b4d80a4fb6ba3861c44c6c9b83/ How to reproduce: - Use an IMAP server/inbox that intermittently returns malformed or truncated protocol responses during search/fetch. - Run Inboxes::FetchImapEmailsJob for that channel and observe the raised parser/read exception. How this was tested: - bundle exec ruby -c app/jobs/inboxes/fetch_imap_emails_job.rb - bundle exec rubocop app/jobs/inboxes/fetch_imap_emails_job.rb |
||
|---|---|---|
| .. | ||
| bulk_auto_assignment_job.rb | ||
| fetch_imap_email_inboxes_job.rb | ||
| fetch_imap_emails_job.rb | ||
| sync_widget_pre_chat_custom_fields_job.rb | ||
| update_widget_pre_chat_custom_fields_job.rb | ||