Sha256: dfc95aefe24d9b8d8642e67f1abf4503b91edef3565597cb5644b5001978bc9d
Contents?: true
Size: 271 Bytes
Versions: 7
Compression:
Stored size: 271 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 mount API::Posts end
Version data entries
7 entries across 7 versions & 1 rubygems