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

ruby-grape / grape / 30695021436
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: fix/adversarial-sweep-2026-08
DEFAULT BRANCH: master
Ran 01 Aug 2026 10:06AM UTC
Jobs 32
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

01 Aug 2026 10:05AM UTC coverage: 96.97% (-0.006%) from 96.976%
30695021436

Pull #2843

github

ericproulx
Let rescue_from :grape_exceptions outrank a catch-all class handler

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>
Pull Request #2843: Let rescue_from :grape_exceptions outrank a catch-all class handler

1207 of 1297 branches covered (93.06%)

Branch coverage included in aggregate %.

15 of 0 new or added lines in 0 files covered. (NaN%)

5 existing lines in 1 file now uncovered.

3817 of 3884 relevant lines covered (98.27%)

26775.23 hits per line

Coverage Regressions

Lines Coverage ∆ File
5
94.12
0.22% lib/grape/middleware/error.rb
Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/multi_xml.gemfile - 30695021436.1 01 Aug 2026 10:07AM UTC 166
47.05
GitHub Action Run
2 run-3.3-Gemfile - 30695021436.2 01 Aug 2026 10:07AM UTC 166
95.59
GitHub Action Run
3 run-3.3-gemfiles/rack_2_2.gemfile - 30695021436.3 01 Aug 2026 10:07AM UTC 166
95.56
GitHub Action Run
4 run-4.0-Gemfile - 30695021436.4 01 Aug 2026 10:07AM UTC 166
95.59
GitHub Action Run
5 run-4.0-gemfiles/rack_2_2.gemfile - 30695021436.5 01 Aug 2026 10:07AM UTC 166
95.56
GitHub Action Run
6 run-3.4-Gemfile - 30695021436.6 01 Aug 2026 10:08AM UTC 166
95.59
GitHub Action Run
7 run-4.0-gemfiles/hashie.gemfile - 30695021436.7 01 Aug 2026 10:08AM UTC 166
61.89
GitHub Action Run
8 run-3.3-gemfiles/rails_7_2.gemfile - 30695021436.8 01 Aug 2026 10:07AM UTC 167
95.6
GitHub Action Run
9 run-3.3-gemfiles/rack_3_1.gemfile - 30695021436.9 01 Aug 2026 10:06AM UTC 166
95.59
GitHub Action Run
10 run-3.3-gemfiles/rack_3_0.gemfile - 30695021436.10 01 Aug 2026 10:07AM UTC 166
95.59
GitHub Action Run
11 run-4.0-gemfiles/multi_json.gemfile - 30695021436.11 01 Aug 2026 10:08AM UTC 166
47.65
GitHub Action Run
12 run-3.4-gemfiles/rack_3_1.gemfile - 30695021436.12 01 Aug 2026 10:07AM UTC 166
95.59
GitHub Action Run
13 run-4.0-gemfiles/grape_swagger.gemfile - 30695021436.13 01 Aug 2026 10:08AM UTC 166
55.23
GitHub Action Run
14 run-4.0-gemfiles/multi_json_1_20.gemfile - 30695021436.14 01 Aug 2026 10:08AM UTC 166
47.69
GitHub Action Run
15 run-4.0-gemfiles/dry_validation.gemfile - 30695021436.15 01 Aug 2026 10:07AM UTC 166
57.99
GitHub Action Run
16 run-3.4-gemfiles/rack_2_2.gemfile - 30695021436.16 01 Aug 2026 10:07AM UTC 166
95.56
GitHub Action Run
17 run-4.0-gemfiles/rack_3_1.gemfile - 30695021436.17 01 Aug 2026 10:07AM UTC 166
95.59
GitHub Action Run
18 run-4.0-gemfiles/rack_3_0.gemfile - 30695021436.18 01 Aug 2026 10:08AM UTC 166
95.59
GitHub Action Run
19 run-4.0-gemfiles/multi_xml_0_8.gemfile - 30695021436.19 01 Aug 2026 10:08AM UTC 166
47.09
GitHub Action Run
20 run-3.4-gemfiles/rails_7_2.gemfile - 30695021436.20 01 Aug 2026 10:08AM UTC 167
95.6
GitHub Action Run
21 run-4.0-gemfiles/rails_8_1.gemfile - 30695021436.21 01 Aug 2026 10:08AM UTC 167
95.6
GitHub Action Run
22 run-4.0-gemfiles/grape_entity.gemfile - 30695021436.22 01 Aug 2026 10:08AM UTC 166
50.34
GitHub Action Run
23 run-3.4-gemfiles/rails_8_1.gemfile - 30695021436.23 01 Aug 2026 10:08AM UTC 167
95.6
GitHub Action Run
24 run-4.0-gemfiles/rails_7_2.gemfile - 30695021436.24 01 Aug 2026 10:07AM UTC 167
95.6
GitHub Action Run
25 run-3.4-gemfiles/rack_3_0.gemfile - 30695021436.25 01 Aug 2026 10:07AM UTC 166
95.59
GitHub Action Run
26 run-4.0-gemfiles/rack_3_2.gemfile - 30695021436.26 01 Aug 2026 10:07AM UTC 166
95.59
GitHub Action Run
27 run-3.3-gemfiles/rails_8_1.gemfile - 30695021436.27 01 Aug 2026 10:07AM UTC 167
95.6
GitHub Action Run
28 run-3.4-gemfiles/rails_8_0.gemfile - 30695021436.28 01 Aug 2026 10:07AM UTC 167
95.6
GitHub Action Run
29 run-3.3-gemfiles/rails_8_0.gemfile - 30695021436.29 01 Aug 2026 10:07AM UTC 167
95.6
GitHub Action Run
30 run-3.3-gemfiles/rack_3_2.gemfile - 30695021436.30 01 Aug 2026 10:07AM UTC 166
95.59
GitHub Action Run
31 run-4.0-gemfiles/rails_8_0.gemfile - 30695021436.31 01 Aug 2026 10:07AM UTC 167
95.6
GitHub Action Run
32 run-3.4-gemfiles/rack_3_2.gemfile - 30695021436.32 01 Aug 2026 10:08AM UTC 166
95.59
GitHub Action Run
Source Files on build 30695021436
  • Tree
  • List 167
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #30695021436
  • Pull Request #2843
  • PR Base - master (#30542026971)
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