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

ruby-grape / grape / 24694315106 / 31
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: perf/build-headers-each-header
DEFAULT BRANCH: master
Ran 20 Apr 2026 10:50PM UTC
Files 154
Run time 5s
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

20 Apr 2026 10:48PM UTC coverage: 95.667% (+0.06%) from 95.605%
24694315106.31

Pull #2688

github

ericproulx
Consolidate rescue handler lookup in Middleware::Error

`rescue_handler_for_base_only_class` and `rescue_handler_for_class_or_its_ancestor`
were structurally identical — same option-hash lookup, same fallback to
`default_rescue_handler`. Only the option key and match predicate differed:
`:base_only_rescue_handlers` + `klass == err` for `rescue_from FooError,
rescue_subclasses: false`, versus `:rescue_handlers` + `klass <= err` for the
default exact-or-ancestor form.

Collapse both into `registered_rescue_handler`, which encapsulates the DSL
concept (any handler the user registered via `rescue_from`) and preserves
exact-before-ancestor precedence. A shared `rescue_handler_from(key, &matcher)`
primitive holds the lookup scaffolding once.

`find_handler` now reads as a priority list of four named concepts: user-
registered handler, Grape exception, catch-all, or re-raise. The exact/ancestor
precedence moves one level down, properly encapsulated inside
`registered_rescue_handler`.

No public API change; behavior is identical.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pull Request #2688: Consolidate rescue handler lookup in Middleware::Error

1043 of 1151 branches covered (90.62%)

Branch coverage included in aggregate %.

3306 of 3395 relevant lines covered (97.38%)

1008.49 hits per line

Source Files on job run-3.4-gemfiles/rack_3_2.gemfile - 24694315106.31
  • Tree
  • List 154
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 24694315106
  • 3b161ad8 on github
  • Prev Job for on refactor/rescue-handler-dedup (#24693877550.31)
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