My Grape app has several error handlers, including lastly:
rescue_from :all, backtrace: true do |e|
message = { errors: { all: e.message } }
rack_response(format_message(message, e.backtrace), 500 )
end
But this is not rescuing at least errors that Grape processes with
throw :error
internally. How do I rescue those errors? The particular errors noted are "The requested format 'txt' is not supported" and "Not Found: some_path". These errors occur when the format extension is missing or only a '.' is supplied, respectively.