Skip to content

Commit

Permalink
Merge pull request #8749 from CitizenLabDotCo/master
Browse files Browse the repository at this point in the history
Release 2024-08-22_2
  • Loading branch information
jinjagit authored Aug 22, 2024
2 parents 980bdf0 + e8f483f commit e76a4f7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ def execute(plan)
task.set_succeeded!
rescue SummarizationFailedError, Faraday::BadRequestError => e
extra = {}
if e.has_attribute?(:response)
if e.instance_of?('Faraday::BadRequestError')
extra[:response] = e&.response
extra[:response_headers] = e&.response&.headers
extra[:response_body] = e&.response&.body
extra[:response_status] = e&.response&.status
extra[:backtrace] = e&.backtrace if e.has_attribute?(:backtrace)
extra[:backtrace] = e&.backtrace
end

ErrorReporter.report(e, extra: extra)
Expand Down

0 comments on commit e76a4f7

Please sign in to comment.