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

Version Path
grape-app-0.10.0 spec/scenario/app/api/v1.rb
grape-app-0.9.0 spec/scenario/app/api/v1.rb
grape-app-0.8.8 spec/scenario/app/api/v1.rb
grape-app-0.8.7 spec/scenario/app/api/v1.rb
grape-app-0.8.6 spec/scenario/app/api/v1.rb
grape-app-0.8.5 spec/scenario/app/api/v1.rb
grape-app-0.8.4 spec/scenario/app/api/v1.rb