• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ruby-grape / grape / 5449198434 / 1
97%
master: 97%

Build:
DEFAULT BRANCH: master
Ran 03 Jul 2023 11:10PM UTC
Files 65
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Jul 2023 11:08PM UTC coverage: 48.524%. Remained the same
5449198434.1

push

github

web-flow
Allow specifying a handler for grape_exceptions (#2342)

* Allow specifying a handler for grape_exceptions

This allows you to customize the format of the error response for grape exceptions:

For example, you could do something like this:

```rb
rescue_from :grape_exceptions do |e|
  error!({ errors: [{ code: 'Error', message: e.message.squish }] }, e.status)
end
```

which would render like this:

```
{
  "errors": [
    {
      "code": "Error",
      "message": "Problem: message body does not match declared format Resolution: when specifying application/json as content-type, you must pass valid application/json in the request's 'body'"
    }
  ]
}
```

* match format

* Fix issue caught by tests

* Update README & CHANGELOG

* Add spec to demonstrate usage

* Fix rubocop offenses

* Fix rubocop offences

559 of 1152 relevant lines covered (48.52%)

0.49 hits per line

Source Files on job run-3.1-rack_2_0 - 5449198434.1
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 5449198434
  • 96ac079e on github
  • Prev Job for on master (#5384158732.14)
  • Next Job for on master (#5456930725.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc