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

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

Build:
Build:
LAST BUILD BRANCH: robust_mounted_app_comparison
DEFAULT BRANCH: master
Ran 08 May 2026 05:56PM UTC
Jobs 37
Files 158
Run time 2min
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

08 May 2026 05:56PM UTC coverage: 96.959% (+0.02%) from 96.935%
25571013968

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)

1090 of 1175 branches covered (92.77%)

Branch coverage included in aggregate %.

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

3438 of 3495 relevant lines covered (98.37%)

32043.18 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/multi_xml.gemfile - 25571013968.1 08 May 2026 05:57PM UTC 157
35.65
GitHub Action Run
2 run-4.0-gemfiles/rails_7_2.gemfile - 25571013968.2 08 May 2026 05:57PM UTC 158
95.67
GitHub Action Run
3 run-3.4-gemfiles/rack_3_1.gemfile - 25571013968.3 08 May 2026 05:57PM UTC 157
95.66
GitHub Action Run
4 run-3.4-gemfiles/rails_7_2.gemfile - 25571013968.4 08 May 2026 05:57PM UTC 158
95.67
GitHub Action Run
5 run-3.4-gemfiles/rails_8_1.gemfile - 25571013968.5 08 May 2026 05:57PM UTC 158
95.67
GitHub Action Run
6 run-3.3-Gemfile - 25571013968.6 08 May 2026 05:57PM UTC 157
95.64
GitHub Action Run
7 run-3.2-gemfiles/rails_8_1.gemfile - 25571013968.7 08 May 2026 05:57PM UTC 158
95.69
GitHub Action Run
8 run-4.0-gemfiles/rails_8_1.gemfile - 25571013968.8 08 May 2026 05:57PM UTC 158
95.67
GitHub Action Run
9 run-3.3-gemfiles/rails_8_1.gemfile - 25571013968.9 08 May 2026 05:57PM UTC 158
95.65
GitHub Action Run
10 run-3.3-gemfiles/rails_8_0.gemfile - 25571013968.10 08 May 2026 05:57PM UTC 158
95.65
GitHub Action Run
11 run-3.2-gemfiles/rack_3_0.gemfile - 25571013968.11 08 May 2026 05:57PM UTC 157
95.69
GitHub Action Run
12 run-3.3-gemfiles/rack_3_1.gemfile - 25571013968.12 08 May 2026 05:57PM UTC 157
95.64
GitHub Action Run
13 run-4.0-gemfiles/dry_validation.gemfile - 25571013968.13 08 May 2026 05:57PM UTC 157
57.76
GitHub Action Run
14 run-3.2-gemfiles/rack_2_2.gemfile - 25571013968.14 08 May 2026 05:56PM UTC 157
95.64
GitHub Action Run
15 run-3.3-gemfiles/rack_3_0.gemfile - 25571013968.15 08 May 2026 05:56PM UTC 157
95.64
GitHub Action Run
16 run-4.0-gemfiles/rack_2_2.gemfile - 25571013968.16 08 May 2026 05:56PM UTC 157
95.62
GitHub Action Run
17 run-3.4-gemfiles/rails_8_0.gemfile - 25571013968.17 08 May 2026 05:57PM UTC 158
95.67
GitHub Action Run
18 run-3.3-gemfiles/rack_2_2.gemfile - 25571013968.18 08 May 2026 05:56PM UTC 157
95.6
GitHub Action Run
19 run-4.0-gemfiles/multi_json.gemfile - 25571013968.19 08 May 2026 05:57PM UTC 157
35.65
GitHub Action Run
20 run-4.0-gemfiles/rails_8_0.gemfile - 25571013968.20 08 May 2026 05:57PM UTC 158
95.67
GitHub Action Run
21 run-3.3-gemfiles/rails_7_2.gemfile - 25571013968.21 08 May 2026 05:57PM UTC 158
95.65
GitHub Action Run
22 run-3.2-Gemfile - 25571013968.22 08 May 2026 05:57PM UTC 157
95.69
GitHub Action Run
23 run-3.4-gemfiles/rack_2_2.gemfile - 25571013968.23 08 May 2026 05:56PM UTC 157
95.62
GitHub Action Run
24 run-3.2-gemfiles/rails_7_2.gemfile - 25571013968.24 08 May 2026 05:57PM UTC 158
95.69
GitHub Action Run
25 run-3.3-gemfiles/rack_3_2.gemfile - 25571013968.25 08 May 2026 05:57PM UTC 157
95.64
GitHub Action Run
26 run-4.0-Gemfile - 25571013968.26 08 May 2026 05:57PM UTC 157
95.66
GitHub Action Run
27 run-3.4-gemfiles/rack_3_0.gemfile - 25571013968.27 08 May 2026 05:56PM UTC 157
95.66
GitHub Action Run
28 run-3.2-gemfiles/rack_3_1.gemfile - 25571013968.28 08 May 2026 05:57PM UTC 157
95.69
GitHub Action Run
29 run-3.2-gemfiles/rails_8_0.gemfile - 25571013968.29 08 May 2026 05:57PM UTC 158
95.69
GitHub Action Run
30 run-4.0-gemfiles/rack_3_0.gemfile - 25571013968.30 08 May 2026 05:56PM UTC 157
95.66
GitHub Action Run
31 run-3.4-Gemfile - 25571013968.31 08 May 2026 05:56PM UTC 157
95.66
GitHub Action Run
32 run-4.0-gemfiles/rack_3_1.gemfile - 25571013968.32 08 May 2026 05:57PM UTC 157
95.66
GitHub Action Run
33 run-3.2-gemfiles/rack_3_2.gemfile - 25571013968.33 08 May 2026 05:56PM UTC 157
95.69
GitHub Action Run
34 run-4.0-gemfiles/rack_3_2.gemfile - 25571013968.34 08 May 2026 05:57PM UTC 157
95.66
GitHub Action Run
35 run-3.4-gemfiles/rack_3_2.gemfile - 25571013968.35 08 May 2026 05:56PM UTC 157
95.66
GitHub Action Run
36 run-4.0-gemfiles/hashie.gemfile - 25571013968.36 08 May 2026 05:57PM UTC 157
62.33
GitHub Action Run
37 run-4.0-gemfiles/grape_entity.gemfile - 25571013968.37 08 May 2026 05:57PM UTC 157
49.62
GitHub Action Run
Source Files on build 25571013968
  • 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 #25571013968
  • Pull Request #2703
  • PR Base - master (#25564552185)
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