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

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

Build:
Build:
LAST BUILD BRANCH: refactor/de-morgan-conditions
DEFAULT BRANCH: master
Ran 09 May 2026 06:57PM UTC
Jobs 37
Files 158
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

09 May 2026 06:56PM UTC coverage: 97.009% (+0.02%) from 96.985%
25609200020

Pull #2703

github

ericproulx
Catch and route exceptions raised inside rescue_from blocks

Resolves #2482. An exception raised inside a `rescue_from` block
used to bubble uncaught and produce the Rack default 500 page. The
middleware now catches it and routes it through one of three paths:

  1. The exception's class has a registered `rescue_from` handler →
     run that handler (with `redispatched: true` so a second raise
     stops the chain — bounded at one redispatch).
  2. The exception is a `Grape::Exceptions::Base` subclass → render
     it via the default Grape error path with its own status and
     message.
  3. Otherwise → fall through to safe_default. The original is
     exposed on `env['grape.exception']` for upstream Rack middleware
     to observe. If the user opted into
     `rescue_from :internal_grape_exceptions do |e| ... end`, that
     handler runs and owns the response. Otherwise the framework
     renders `Grape::Exceptions::InternalServerError` (status 500,
     generic message) — never the original exception's message.

The framework deliberately does no logging of its own for
unhandled internal exceptions. Formatting and destination are
application concerns; the `:internal_grape_exceptions` handler is
where the application opts in to logging, error-tracker forwarding,
or any other observability it cares about.

Adds:
  * `Grape::Exceptions::InternalServerError` — i18n-backed safe
    stand-in.
  * `Grape::Env::GRAPE_EXCEPTION` — env key carrying the original.
  * `rescue_from :internal_grape_exceptions` — DSL opt-in mirroring
    `:grape_exceptions`. Lets the application capture the exception
    and shape the response.

Existing behaviour preserved when the handler returns a non-Response
non-error value (still produces `InvalidResponse` via the default
handler).

UPGRADING note + README rescue_from section document the new
behaviour and the `:internal_grape_exceptions` opt-in.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pull Request #2703: Catch exceptions raised inside rescue_from blocks (#2482)

1093 of 1177 branches covered (92.86%)

Branch coverage included in aggregate %.

29 of 29 new or added lines in 5 files covered. (100.0%)

3447 of 3503 relevant lines covered (98.4%)

32092.02 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.4-gemfiles/rails_8_1.gemfile - 25609200020.1 09 May 2026 06:57PM UTC 158
95.72
GitHub Action Run
2 run-3.2-gemfiles/rails_8_0.gemfile - 25609200020.2 09 May 2026 06:57PM UTC 158
95.74
GitHub Action Run
3 run-3.4-gemfiles/rack_3_2.gemfile - 25609200020.3 09 May 2026 06:57PM UTC 157
95.72
GitHub Action Run
4 run-4.0-gemfiles/rails_8_0.gemfile - 25609200020.4 09 May 2026 06:57PM UTC 158
95.72
GitHub Action Run
5 run-3.4-gemfiles/rack_3_0.gemfile - 25609200020.5 09 May 2026 06:57PM UTC 157
95.72
GitHub Action Run
6 run-3.2-gemfiles/rails_8_1.gemfile - 25609200020.6 09 May 2026 06:57PM UTC 158
95.74
GitHub Action Run
7 run-3.2-gemfiles/rack_3_0.gemfile - 25609200020.7 09 May 2026 06:57PM UTC 157
95.74
GitHub Action Run
8 run-3.3-gemfiles/rails_7_2.gemfile - 25609200020.8 09 May 2026 06:57PM UTC 158
95.7
GitHub Action Run
9 run-4.0-gemfiles/rack_3_1.gemfile - 25609200020.9 09 May 2026 06:57PM UTC 157
95.72
GitHub Action Run
10 run-4.0-gemfiles/rack_2_2.gemfile - 25609200020.10 09 May 2026 06:57PM UTC 157
95.67
GitHub Action Run
11 run-4.0-gemfiles/rails_8_1.gemfile - 25609200020.11 09 May 2026 06:57PM UTC 158
95.72
GitHub Action Run
12 run-4.0-gemfiles/rack_3_0.gemfile - 25609200020.12 09 May 2026 06:57PM UTC 157
95.72
GitHub Action Run
13 run-3.3-gemfiles/rack_2_2.gemfile - 25609200020.13 09 May 2026 06:57PM UTC 157
95.65
GitHub Action Run
14 run-3.3-Gemfile - 25609200020.14 09 May 2026 06:57PM UTC 157
95.7
GitHub Action Run
15 run-3.4-gemfiles/rack_2_2.gemfile - 25609200020.15 09 May 2026 06:57PM UTC 157
95.67
GitHub Action Run
16 run-3.3-gemfiles/rack_3_1.gemfile - 25609200020.16 09 May 2026 06:57PM UTC 157
95.7
GitHub Action Run
17 run-3.2-gemfiles/rack_2_2.gemfile - 25609200020.17 09 May 2026 06:57PM UTC 157
95.7
GitHub Action Run
18 run-3.2-gemfiles/rails_7_2.gemfile - 25609200020.18 09 May 2026 06:57PM UTC 158
95.74
GitHub Action Run
19 run-3.2-Gemfile - 25609200020.19 09 May 2026 06:57PM UTC 157
95.74
GitHub Action Run
20 run-3.3-gemfiles/rack_3_0.gemfile - 25609200020.20 09 May 2026 06:57PM UTC 157
95.7
GitHub Action Run
21 run-4.0-gemfiles/grape_entity.gemfile - 25609200020.21 09 May 2026 06:57PM UTC 157
49.88
GitHub Action Run
22 run-3.3-gemfiles/rack_3_2.gemfile - 25609200020.22 09 May 2026 06:57PM UTC 157
95.7
GitHub Action Run
23 run-3.3-gemfiles/rails_8_1.gemfile - 25609200020.23 09 May 2026 06:57PM UTC 158
95.7
GitHub Action Run
24 run-3.4-gemfiles/rack_3_1.gemfile - 25609200020.24 09 May 2026 06:57PM UTC 157
95.72
GitHub Action Run
25 run-3.4-gemfiles/rails_7_2.gemfile - 25609200020.25 09 May 2026 06:57PM UTC 158
95.72
GitHub Action Run
26 run-3.2-gemfiles/rack_3_1.gemfile - 25609200020.26 09 May 2026 06:57PM UTC 157
95.74
GitHub Action Run
27 run-4.0-Gemfile - 25609200020.27 09 May 2026 06:58PM UTC 157
95.72
GitHub Action Run
28 run-4.0-gemfiles/rails_7_2.gemfile - 25609200020.28 09 May 2026 06:57PM UTC 158
95.72
GitHub Action Run
29 run-4.0-gemfiles/hashie.gemfile - 25609200020.29 09 May 2026 06:57PM UTC 157
62.58
GitHub Action Run
30 run-4.0-gemfiles/multi_xml.gemfile - 25609200020.30 09 May 2026 06:57PM UTC 157
35.96
GitHub Action Run
31 run-3.4-gemfiles/rails_8_0.gemfile - 25609200020.31 09 May 2026 06:57PM UTC 158
95.72
GitHub Action Run
32 run-3.3-gemfiles/rails_8_0.gemfile - 25609200020.32 09 May 2026 06:57PM UTC 158
95.7
GitHub Action Run
33 run-3.4-Gemfile - 25609200020.33 09 May 2026 06:57PM UTC 157
95.72
GitHub Action Run
34 run-4.0-gemfiles/multi_json.gemfile - 25609200020.34 09 May 2026 06:57PM UTC 157
35.96
GitHub Action Run
35 run-4.0-gemfiles/dry_validation.gemfile - 25609200020.35 09 May 2026 06:57PM UTC 157
58.02
GitHub Action Run
36 run-3.2-gemfiles/rack_3_2.gemfile - 25609200020.36 09 May 2026 06:57PM UTC 157
95.74
GitHub Action Run
37 run-4.0-gemfiles/rack_3_2.gemfile - 25609200020.37 09 May 2026 06:57PM UTC 157
95.72
GitHub Action Run
Source Files on build 25609200020
  • Tree
  • List 158
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #25609200020
  • Pull Request #2703
  • PR Base - master (#25608800647)
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