Skip to content

Commit

Permalink
add info from Dry::Struct::Error to 500 errors in objects#show
Browse files Browse the repository at this point in the history
  • Loading branch information
ndushay committed Nov 21, 2019
1 parent a5dfffd commit d21ee56
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/objects_controller.rb
Expand Up @@ -15,6 +15,10 @@ class ObjectsController < ApplicationController
render status: :conflict, plain: e.message, location: object_location(e.pid)
end

rescue_from(Dry::Struct::Error) do |e|
render status: :internal_server_error, plain: e.message
end

rescue_from(SymphonyReader::ResponseError) do |e|
render status: :internal_server_error, plain: e.message
end
Expand Down

0 comments on commit d21ee56

Please sign in to comment.