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

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

Build:
Build:
LAST BUILD BRANCH: perf/build-headers-each-header
DEFAULT BRANCH: master
Ran 20 Apr 2026 10:50PM UTC
Files 155
Run time 6s
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.694% (+0.06%) from 95.633%
24694315106.23

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

1045 of 1153 branches covered (90.63%)

Branch coverage included in aggregate %.

3311 of 3399 relevant lines covered (97.41%)

1007.7 hits per line

Source Files on job run-3.2-gemfiles/rails_8_0.gemfile - 24694315106.23
  • Tree
  • List 155
  • 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.6)
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