Proper settings for capturing inside the popular API gem "Grape" for Rails applications to capture 500s
global exception handler, used for error notifications
rescue_from :all do |e|
if Rails.env.development?
raise e
else
Rollbar.error(e)
error_response(message: "Internal server error", status: 500)
end
end