Skip to content

Commit

Permalink
Fixes #5081 - rake zammad:email_parser:reprocess_articles does not th…
Browse files Browse the repository at this point in the history
…row error when unsuccessful.
  • Loading branch information
rolfschmidt committed Mar 12, 2024
1 parent bec3d42 commit 143a899
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/models/channel/email_parser.rb
Expand Up @@ -537,6 +537,11 @@ def self.process_unprocessable_articles(_params = {})

ApplicationHandleInfo.use('email_parser.postmaster') do
parsed = Channel::EmailParser.new.parse(article.as_raw.content)
if parsed[:body] == ::HtmlSanitizer::UNPROCESSABLE_HTML_MSG
puts "ERROR: Failed to reprocess the article, please verify the content of the article and if needed increase the timeout (see: Setting.get('html_sanitizer_processing_timeout'))." # rubocop:disable Rails/Output
next
end

article.update!(body: parsed[:body], content_type: parsed[:content_type])
end
end
Expand Down

0 comments on commit 143a899

Please sign in to comment.