Sha256: 374515709f53380993d01350cfc51c0687ac4b22a22874b98b885b39d04dbbd3
Contents?: true
Size: 261 Bytes
Versions: 1
Compression:
Stored size: 261 Bytes
Contents
class API::V1 < Grape::API::Instance 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.6.4 | spec/scenario/app/api/v1.rb |