Skip to content

Commit

Permalink
Also report errors to honeybadger where we're more likely to see them
Browse files Browse the repository at this point in the history
  • Loading branch information
bess committed May 6, 2024
1 parent 0c4de78 commit f2c1018
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/works_wizard_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ def file_uploaded
# Notice that we log the URL (rather than @work.doi) because sometimes we are getting a nil @work.
# The URL will include the ID and might help us troubleshoot the issue further if it happens again.
# See https://github.com/pulibrary/pdc_describe/issues/1801
Rails.logger.error("Failed to update work snapshot, URL: #{request.url}: #{ex}")
error_message = "Failed to update work snapshot, URL: #{request.url}: #{ex}"
Rails.logger.error(error_message)
Honeybadger.notify(error_message)
flash[:notice] = "Failed to update work snapshot, work: #{@work&.doi}: #{ex}. Please contact rdss@princeton.edu for assistance."

redirect_to work_file_upload_path(@work)
Expand Down

0 comments on commit f2c1018

Please sign in to comment.