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

ruby-grape / grape / 32583678355
97%

Build:
DEFAULT BRANCH: master
Ran 22 Aug 2026 04:06PM UTC
Jobs 5
Files 167
Run time 1min
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

22 Aug 2026 04:05PM UTC coverage: 95.767% (-1.2%) from 96.991%
32583678355

push

github

web-flow
Let rescue_from :grape_exceptions outrank a catch-all class handler (#2843)

rescue_from :grape_exceptions is an opt-in to keep Grape's own errors
rendering with their own status -- a validation failure answers 400 rather
than whatever the application's catch-all returns.

It only ever worked against rescue_from :all, which lives in
all_rescue_handler and is consulted last. Written as a class instead,
rescue_from StandardError is a registered handler, matched first, and Grape's
exceptions are StandardErrors -- so the opt-in silently did nothing and
validation errors still came back as 500s:

    rescue_from StandardError { error!('server error', 500) }
    rescue_from :grape_exceptions          # inert

Let the opt-in win over a handler that only matched through a non-Grape
ancestor. A handler registered for a Grape exception class is more precise
than the opt-in and still wins, so an explicit
rescue_from Grape::Exceptions::ValidationErrors keeps its handler.

registered_rescue_handler gains an _entry variant returning the matched class
alongside its handler, since deciding this needs to know *which* class matched,
not just that one did. find_handler resolves the entry once and passes it down.

Application errors still reach the catch-all, rescue_from :all is unchanged,
and InvalidVersionHeader is left alone so it keeps reaching Rack and version
cascading still works.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

1217 of 1330 branches covered (91.5%)

Branch coverage included in aggregate %.

15 of 15 new or added lines in 1 file covered. (100.0%)

43 existing lines in 9 files now uncovered.

3851 of 3962 relevant lines covered (97.2%)

5603.98 hits per line

Coverage Regressions

Lines Coverage ∆ File
12
30.43
-60.87% lib/grape/json.rb
11
42.31
-57.69% lib/grape/validations/validators/contract_scope_validator.rb
7
26.67
-73.33% lib/grape/validations/contract_scope.rb
5
80.0
-16.3% lib/grape/error_formatter/base.rb
2
88.89
-9.52% lib/grape/dsl/entity.rb
2
66.67
-33.33% lib/grape/util/header.rb
2
63.64
-36.36% lib/grape/xml.rb
1
80.0
-20.0% lib/grape/params_builder/hashie_mash.rb
1
99.72
-0.28% lib/grape/util/inheritable_setting.rb
Jobs
ID Job ID Ran Files Coverage
1 run-3.3-rack_edge - 32583678355.1 22 Aug 2026 04:06PM UTC 167
95.73
GitHub Action Run
2 run-4.0-rack_edge - 32583678355.2 22 Aug 2026 04:06PM UTC 167
95.73
GitHub Action Run
3 run-jruby-head-rack_edge - 32583678355.3 22 Aug 2026 04:08PM UTC 167
96.67
GitHub Action Run
4 run-3.4-rack_edge - 32583678355.4 22 Aug 2026 04:06PM UTC 167
95.73
GitHub Action Run
5 run-ruby-head-rack_edge - 32583678355.5 22 Aug 2026 04:06PM UTC 167
95.73
GitHub Action Run
Source Files on build 32583678355
  • Tree
  • List 167
  • Changed 35
  • Source Changed 0
  • Coverage Changed 35
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #32583678355
  • f2f36196 on github
  • Prev Build on master (#32583377655)
  • Next Build on master (#32639177546)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc