Rescue from JSON::ParserError

pull/1558/head
Rick Carlino 2019-11-04 07:39:04 -06:00
parent 6efe519d70
commit d5f8c00eef
1 changed files with 1 additions and 0 deletions

View File

@ -33,6 +33,7 @@ module Api
rescue_from(JWT::VerificationError) { |e| auth_err }
rescue_from(ActionDispatch::Http::Parameters::ParseError) { sorry NOT_JSON }
rescue_from(JSON::ParserError) { sorry NOT_JSON }
rescue_from(ActiveRecord::ValueTooLong) do
sorry "Please use reasonable lengths on string inputs"