Skip to content

Commit

Permalink
Fix error when reporting background XML errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cooperka committed Sep 5, 2023
1 parent 3b529dc commit aa2b49c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/utils/xml_packager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def zip(zipfile_name, download_scope)
next unless response.odk_xml.present?
zip_xml(zipfile, response)
rescue Zip::EntryExistsError => e
report_error(e)
report_error(e, response)
next
end
end
Expand All @@ -62,9 +62,9 @@ def zip_xml(zipfile, response)
zipfile.add(zip_entry, xml_filepath)
end

def report_error(error)
def report_error(error, response)
Sentry.add_breadcrumb(Sentry::Breadcrumb.new(
message: "Mission: #{@operation.mission.compact_name}. Response ID: #{rid}"
message: "Mission: #{@operation.mission.compact_name}. Response ID: #{response.id}"
))
notify_admins(error)
end
Expand Down

0 comments on commit aa2b49c

Please sign in to comment.