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

ruby-grape / grape / 33414584203
97%

Build:
DEFAULT BRANCH: master
Ran 31 Aug 2026 04:31PM UTC
Jobs 32
Files 169
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

31 Aug 2026 04:31PM UTC coverage: 96.948%. First build
33414584203

push

github

web-flow
Build an error response's backtrace only when it will be rendered (#2878)

Every error response materialized the exception's backtrace.
`ErrorResponse.from_exception` read `exception.backtrace` to store it, and
`Middleware::Error#error_response` re-derived it with
`raw.backtrace || raw.original_exception&.backtrace || []`.

`Exception#backtrace` is not a field read: it converts the captured frames into
an Array of location Strings, one per frame, and a Grape error is raised deep
inside the validation stack. Meanwhile every built-in error formatter drops the
result unless the API asked for it:

    wrapped_message[:backtrace] = error.backtrace if include_backtrace && ...

and `include_backtrace` is `rescue_from ..., backtrace: true`, off by default.
So the common 400 paid to build a backtrace that was then discarded.

`from_exception` no longer reads it — the exception travels on the payload as
`original_exception`, so nothing is lost — and `error_response` assembles one
only when `include_backtrace` is set.

On a small API answering a validation failure (400 Bad Request), median of 9
interleaved runs, Ruby 4.0.5 with YJIT:

    8,749 -> 11,878 req/s   (+36%)
    333 -> 266 objects per request

`rescue_from ..., backtrace: true` and `original_exception: true` render exactly
as before; the specs covering both are unchanged.

A custom error formatter that reads `error.backtrace` while ignoring the
`include_backtrace:` argument it is passed now receives an empty Array. It still
has `error.original_exception` and can call `#backtrace` on that itself. See
UPGRADING.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

1236 of 1330 branches covered (92.93%)

Branch coverage included in aggregate %.

3 of 3 new or added lines in 1 file covered. (100.0%)

3910 of 3978 relevant lines covered (98.29%)

27268.44 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-Gemfile - 33414584203.1 31 Aug 2026 04:32PM UTC 168
95.7
GitHub Action Run
2 run-4.0-gemfiles/dry_validation.gemfile - 33414584203.2 31 Aug 2026 04:31PM UTC 168
57.85
GitHub Action Run
3 run-4.0-gemfiles/multi_json_1_20.gemfile - 33414584203.3 31 Aug 2026 04:31PM UTC 168
47.49
GitHub Action Run
4 run-3.4-gemfiles/rack_3_1.gemfile - 33414584203.4 31 Aug 2026 04:32PM UTC 168
95.7
GitHub Action Run
5 run-3.4-gemfiles/rack_2_2.gemfile - 33414584203.5 31 Aug 2026 04:32PM UTC 168
95.66
GitHub Action Run
6 run-4.0-gemfiles/hashie.gemfile - 33414584203.6 31 Aug 2026 04:32PM UTC 168
61.73
GitHub Action Run
7 run-3.4-Gemfile - 33414584203.7 31 Aug 2026 04:32PM UTC 168
95.7
GitHub Action Run
8 run-3.3-gemfiles/rails_7_2.gemfile - 33414584203.8 31 Aug 2026 04:32PM UTC 169
95.7
GitHub Action Run
9 run-4.0-gemfiles/multi_xml.gemfile - 33414584203.9 31 Aug 2026 04:32PM UTC 168
46.85
GitHub Action Run
10 run-3.3-gemfiles/rails_8_1.gemfile - 33414584203.10 31 Aug 2026 04:32PM UTC 169
95.7
GitHub Action Run
11 run-4.0-gemfiles/grape_entity.gemfile - 33414584203.11 31 Aug 2026 04:32PM UTC 168
50.23
GitHub Action Run
12 run-4.0-gemfiles/rails_7_2.gemfile - 33414584203.12 31 Aug 2026 04:31PM UTC 169
95.7
GitHub Action Run
13 run-3.3-Gemfile - 33414584203.13 31 Aug 2026 04:31PM UTC 168
95.7
GitHub Action Run
14 run-3.3-gemfiles/rack_2_2.gemfile - 33414584203.14 31 Aug 2026 04:31PM UTC 168
95.66
GitHub Action Run
15 run-4.0-gemfiles/rack_2_2.gemfile - 33414584203.15 31 Aug 2026 04:31PM UTC 168
95.66
GitHub Action Run
16 run-3.3-gemfiles/rack_3_1.gemfile - 33414584203.16 31 Aug 2026 04:31PM UTC 168
95.7
GitHub Action Run
17 run-3.3-gemfiles/rails_8_0.gemfile - 33414584203.17 31 Aug 2026 04:31PM UTC 169
95.7
GitHub Action Run
18 run-4.0-gemfiles/rack_3_2.gemfile - 33414584203.18 31 Aug 2026 04:31PM UTC 168
95.7
GitHub Action Run
19 run-4.0-gemfiles/multi_json.gemfile - 33414584203.19 31 Aug 2026 04:32PM UTC 168
47.45
GitHub Action Run
20 run-3.3-gemfiles/rack_3_2.gemfile - 33414584203.20 31 Aug 2026 04:31PM UTC 168
95.7
GitHub Action Run
21 run-3.4-gemfiles/rails_8_1.gemfile - 33414584203.21 31 Aug 2026 04:31PM UTC 169
95.7
GitHub Action Run
22 run-4.0-gemfiles/rack_3_0.gemfile - 33414584203.22 31 Aug 2026 04:31PM UTC 168
95.7
GitHub Action Run
23 run-4.0-gemfiles/rack_3_1.gemfile - 33414584203.23 31 Aug 2026 04:31PM UTC 168
95.7
GitHub Action Run
24 run-3.4-gemfiles/rack_3_0.gemfile - 33414584203.24 31 Aug 2026 04:31PM UTC 168
95.7
GitHub Action Run
25 run-3.3-gemfiles/rack_3_0.gemfile - 33414584203.25 31 Aug 2026 04:31PM UTC 168
95.7
GitHub Action Run
26 run-4.0-gemfiles/rails_8_0.gemfile - 33414584203.26 31 Aug 2026 04:32PM UTC 169
95.7
GitHub Action Run
27 run-4.0-gemfiles/rails_8_1.gemfile - 33414584203.27 31 Aug 2026 04:31PM UTC 169
95.7
GitHub Action Run
28 run-4.0-gemfiles/grape_swagger.gemfile - 33414584203.28 31 Aug 2026 04:32PM UTC 168
55.17
GitHub Action Run
29 run-4.0-gemfiles/multi_xml_0_8.gemfile - 33414584203.29 31 Aug 2026 04:32PM UTC 168
46.89
GitHub Action Run
30 run-3.4-gemfiles/rack_3_2.gemfile - 33414584203.30 31 Aug 2026 04:32PM UTC 168
95.7
GitHub Action Run
31 run-3.4-gemfiles/rails_8_0.gemfile - 33414584203.31 31 Aug 2026 04:32PM UTC 169
95.7
GitHub Action Run
32 run-3.4-gemfiles/rails_7_2.gemfile - 33414584203.32 31 Aug 2026 04:32PM UTC 169
95.7
GitHub Action Run
Source Files on build 33414584203
  • Tree
  • List 169
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #33414584203
  • 1bd8cc9a on github
  • Prev Build on master (#33414208926)
  • Next Build on master (#33553778244)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc