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

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

Build:
Build:
LAST BUILD BRANCH: robust_mounted_app_comparison
DEFAULT BRANCH: master
Ran 09 May 2026 05:49PM 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 05:48PM UTC coverage: 97.007% (+0.02%) from 96.983%
25607737445

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 %.

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

3445 of 3501 relevant lines covered (98.4%)

32059.16 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/rails_8_1.gemfile - 25607737445.1 09 May 2026 05:49PM UTC 158
95.72
GitHub Action Run
2 run-3.4-Gemfile - 25607737445.2 09 May 2026 05:49PM UTC 157
95.71
GitHub Action Run
3 run-3.3-gemfiles/rails_7_2.gemfile - 25607737445.3 09 May 2026 05:49PM UTC 158
95.7
GitHub Action Run
4 run-3.3-gemfiles/rack_3_0.gemfile - 25607737445.4 09 May 2026 05:49PM UTC 157
95.69
GitHub Action Run
5 run-4.0-gemfiles/dry_validation.gemfile - 25607737445.5 09 May 2026 05:49PM UTC 157
58.02
GitHub Action Run
6 run-4.0-gemfiles/rack_3_2.gemfile - 25607737445.6 09 May 2026 05:49PM UTC 157
95.71
GitHub Action Run
7 run-3.2-gemfiles/rails_8_0.gemfile - 25607737445.7 09 May 2026 05:49PM UTC 158
95.74
GitHub Action Run
8 run-3.4-gemfiles/rails_7_2.gemfile - 25607737445.8 09 May 2026 05:49PM UTC 158
95.72
GitHub Action Run
9 run-3.2-Gemfile - 25607737445.9 09 May 2026 05:49PM UTC 157
95.74
GitHub Action Run
10 run-3.3-gemfiles/rack_3_2.gemfile - 25607737445.10 09 May 2026 05:49PM UTC 157
95.69
GitHub Action Run
11 run-3.3-gemfiles/rails_8_1.gemfile - 25607737445.11 09 May 2026 05:49PM UTC 158
95.7
GitHub Action Run
12 run-3.3-gemfiles/rack_2_2.gemfile - 25607737445.12 09 May 2026 05:49PM UTC 157
95.65
GitHub Action Run
13 run-3.2-gemfiles/rack_2_2.gemfile - 25607737445.13 09 May 2026 05:49PM UTC 157
95.7
GitHub Action Run
14 run-4.0-gemfiles/multi_xml.gemfile - 25607737445.14 09 May 2026 05:49PM UTC 157
35.95
GitHub Action Run
15 run-3.2-gemfiles/rack_3_1.gemfile - 25607737445.15 09 May 2026 05:49PM UTC 157
95.74
GitHub Action Run
16 run-3.3-gemfiles/rack_3_1.gemfile - 25607737445.16 09 May 2026 05:49PM UTC 157
95.69
GitHub Action Run
17 run-4.0-gemfiles/rails_7_2.gemfile - 25607737445.17 09 May 2026 05:49PM UTC 158
95.72
GitHub Action Run
18 run-3.4-gemfiles/rack_3_2.gemfile - 25607737445.18 09 May 2026 05:49PM UTC 157
95.71
GitHub Action Run
19 run-4.0-gemfiles/grape_entity.gemfile - 25607737445.19 09 May 2026 05:49PM UTC 157
49.88
GitHub Action Run
20 run-4.0-gemfiles/multi_json.gemfile - 25607737445.20 09 May 2026 05:49PM UTC 157
35.95
GitHub Action Run
21 run-4.0-gemfiles/rails_8_0.gemfile - 25607737445.21 09 May 2026 05:49PM UTC 158
95.72
GitHub Action Run
22 run-4.0-gemfiles/rack_3_1.gemfile - 25607737445.22 09 May 2026 05:49PM UTC 157
95.71
GitHub Action Run
23 run-3.2-gemfiles/rack_3_0.gemfile - 25607737445.23 09 May 2026 05:49PM UTC 157
95.74
GitHub Action Run
24 run-3.2-gemfiles/rack_3_2.gemfile - 25607737445.24 09 May 2026 05:49PM UTC 157
95.74
GitHub Action Run
25 run-3.2-gemfiles/rails_7_2.gemfile - 25607737445.25 09 May 2026 05:49PM UTC 158
95.74
GitHub Action Run
26 run-3.3-gemfiles/rails_8_0.gemfile - 25607737445.26 09 May 2026 05:49PM UTC 158
95.7
GitHub Action Run
27 run-3.3-Gemfile - 25607737445.27 09 May 2026 05:49PM UTC 157
95.69
GitHub Action Run
28 run-4.0-Gemfile - 25607737445.28 09 May 2026 05:49PM UTC 157
95.71
GitHub Action Run
29 run-4.0-gemfiles/rack_2_2.gemfile - 25607737445.29 09 May 2026 05:49PM UTC 157
95.67
GitHub Action Run
30 run-3.4-gemfiles/rack_2_2.gemfile - 25607737445.30 09 May 2026 05:49PM UTC 157
95.67
GitHub Action Run
31 run-4.0-gemfiles/rack_3_0.gemfile - 25607737445.31 09 May 2026 05:49PM UTC 157
95.71
GitHub Action Run
32 run-3.2-gemfiles/rails_8_1.gemfile - 25607737445.32 09 May 2026 05:49PM UTC 158
95.74
GitHub Action Run
33 run-3.4-gemfiles/rails_8_1.gemfile - 25607737445.33 09 May 2026 05:49PM UTC 158
95.72
GitHub Action Run
34 run-3.4-gemfiles/rails_8_0.gemfile - 25607737445.34 09 May 2026 05:49PM UTC 158
95.72
GitHub Action Run
35 run-3.4-gemfiles/rack_3_1.gemfile - 25607737445.35 09 May 2026 05:49PM UTC 157
95.71
GitHub Action Run
36 run-4.0-gemfiles/hashie.gemfile - 25607737445.36 09 May 2026 05:49PM UTC 157
62.59
GitHub Action Run
37 run-3.4-gemfiles/rack_3_0.gemfile - 25607737445.37 09 May 2026 05:49PM UTC 157
95.71
GitHub Action Run
Source Files on build 25607737445
  • 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 #25607737445
  • Pull Request #2703
  • PR Base - master (#25583959632)
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