Commit a1bf8cc1 by ivan Lan

Add record not found rescue_from

parent 64324db9
......@@ -61,6 +61,10 @@ module Shotengai
render json: { error: e.message }, status: 400
end
rescue_from ActiveRecord::RecordNotFound do |e|
render json: { error: e.message }, status: 404
end
rescue_from AASM::InvalidTransition do |e|
render json: { error: e.message }, status: 400
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment