-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
I have a simple API
class Root < Grape::API
content_type :json, 'application/json; charset=UTF-8'
default_format :json
rescue_from ActiveRecord::RecordNotFound do
error!({ error: :not_found }, 404)
end
end
When an ActiveRecord::RecordNotFound
is raised, I expect my API returns "{"error":"not_found"}
as JSON, but it retures {"error":"not_found"}
It worked well in 1.0.3
version but broken in 1.1.0
Is there any workaround for it?
It's related to #1763