Sha256: 07e8c3ccf17038fd4b901247b884a8bb35cd38640708e453c494ca2dda935c73
Contents?: true
Size: 252 Bytes
Versions: 1
Compression:
Stored size: 252 Bytes
Contents
class API::V1 < Grape::API version 'v1' format :json rescue_from MyLib::BadRequest do |e| error!({ error: e }, 400) end get '/ok' do { status: 'OK' } end get '/failing' do raise MyLib::BadRequest, "bad request" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
grape-app-0.5.3 | spec/scenario/app/api/v1.rb |