Sha256: 72279d43fd63443405aa394675aead109e536717fb6e39b859b39810acfdb440
Contents?: true
Size: 585 Bytes
Versions: 22
Compression:
Stored size: 585 Bytes
Contents
require 'grape' class Wrapper < Grape::API class GrapeSimple < Grape::API rescue_from :all do |e| error_response({ message: "rescued from #{e.class.name}" }) end get '/json_endpoint' do present({ :test => true }) end get "/break" do raise Exception.new("This should have http status code 500!") end get "/error" do error!("This is a error with 'error'!") end get "/breakstring" do raise "This should have http status code 500!" end end end class GrapeNested < Grape::API mount Wrapper::GrapeSimple end
Version data entries
22 entries across 22 versions & 2 rubygems