beezwax/fmrest-ruby

Set Rails’ ActionDispatch FmRest exceptions handling

Closed this issue · 1 comments

pilaf commented

See: https://makandracards.com/makandra/41790-how-rails-chooses-error-pages-404-500-for-exceptions

Rails' ActionDispatch will by default handle ActiveRecord::RecordNotFound and other exceptions appropriately and deliver a 404.

It is possible to extend this ActionDispatch behavior with more known exceptions (see above link), so it would be good if the gem could have a railstie script where to set this up by default. We want to add support for FmRest::APIError::RecordMissingError especially, mapping it to a 404 error, but other errors may be mappable as well.

pilaf commented

Implemented in 0.23.0.