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

ruby-grape / grape / 36924858285
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: fix/error-raises
DEFAULT BRANCH: master
Ran 01 Oct 2026 08:53PM UTC
Jobs 32
Files 167
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

01 Oct 2026 08:53PM UTC coverage: 99.966%. First build
36924858285

Pull #3023

github

ericproulx
Raise from error! instead of throwing :error

error! threw :error, and a throw is not an exception. Active Record
commits a transaction that a throw leaves, so error! inside a
transaction saved what the block had written while the client was told
the request failed. A throw cannot leave the fiber it was thrown in
either, so error! inside an Async task answered 500.

error! now raises Grape::Exceptions::Halt, a StandardError carrying the
same ErrorResponse. The error middleware takes it inside its catch, so
it is rendered where a thrown error is and never reaches rescue_from.
Its backtrace is preset empty, as Validation's is, so raise skips
capturing one.

Raising costs more than throwing, so ErrorResponse is now a plain frozen
class rather than a Data. Every error response builds at least two of
them, and Data's constructor takes its keywords as a Hash it then
validates: about 450 ns each and 700 ns for the copy #with made, against
about 120 ns. It answers only what Grape reads off it, its readers, and
stays frozen; error_response builds its copy with new. Nothing compared,
hashed, converted or pattern-matched one, so the rest of Data's
interface is dropped, as UPGRADING says. Halt spells its keywords out
for the same reason. With both, an error! response is at least as fast
as before, and other error responses are faster.

throw :error from middleware and rescue_from handlers keeps working.

Fixes #2197

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pull Request #3023: Raise from error! instead of throwing :error

1512 of 1513 branches covered (99.93%)

Branch coverage included in aggregate %.

25 of 25 new or added lines in 4 files covered. (100.0%)

4406 of 4407 relevant lines covered (99.98%)

29595.05 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/multi_xml_0_8.gemfile - 36924858285.1 01 Oct 2026 08:53PM UTC 165
45.58
GitHub Action Run
2 run-3.3-Gemfile - 36924858285.2 01 Oct 2026 08:53PM UTC 166
98.82
GitHub Action Run
3 run-3.3-gemfiles/rack_3_1.gemfile - 36924858285.3 01 Oct 2026 08:53PM UTC 166
98.82
GitHub Action Run
4 run-3.3-gemfiles/rails_8_1.gemfile - 36924858285.4 01 Oct 2026 08:54PM UTC 167
98.82
GitHub Action Run
5 run-4.0-gemfiles/multi_json.gemfile - 36924858285.5 01 Oct 2026 08:53PM UTC 165
45.86
GitHub Action Run
6 run-4.0-gemfiles/grape_entity.gemfile - 36924858285.6 01 Oct 2026 08:53PM UTC 165
48.76
GitHub Action Run
7 run-3.4-Gemfile - 36924858285.7 01 Oct 2026 08:53PM UTC 166
98.8
GitHub Action Run
8 run-3.3-gemfiles/rack_3_0.gemfile - 36924858285.8 01 Oct 2026 08:53PM UTC 166
98.82
GitHub Action Run
9 run-3.4-gemfiles/rack_3_0.gemfile - 36924858285.9 01 Oct 2026 08:54PM UTC 166
98.78
GitHub Action Run
10 run-4.0-gemfiles/multi_xml.gemfile - 36924858285.10 01 Oct 2026 08:53PM UTC 165
45.55
GitHub Action Run
11 run-3.4-gemfiles/rails_8_0.gemfile - 36924858285.11 01 Oct 2026 08:54PM UTC 167
98.8
GitHub Action Run
12 run-4.0-gemfiles/grape_swagger.gemfile - 36924858285.12 01 Oct 2026 08:54PM UTC 165
53.09
GitHub Action Run
13 run-4.0-gemfiles/rack_3_0.gemfile - 36924858285.13 01 Oct 2026 08:54PM UTC 166
98.8
GitHub Action Run
14 run-3.3-gemfiles/rails_8_0.gemfile - 36924858285.14 01 Oct 2026 08:54PM UTC 167
98.82
GitHub Action Run
15 run-3.4-gemfiles/rack_2_2.gemfile - 36924858285.15 01 Oct 2026 08:53PM UTC 166
98.77
GitHub Action Run
16 run-3.3-gemfiles/rack_2_2.gemfile - 36924858285.16 01 Oct 2026 08:53PM UTC 166
98.78
GitHub Action Run
17 run-3.3-gemfiles/rack_3_2.gemfile - 36924858285.17 01 Oct 2026 08:53PM UTC 166
98.82
GitHub Action Run
18 run-3.4-gemfiles/rails_7_2.gemfile - 36924858285.18 01 Oct 2026 08:53PM UTC 167
98.8
GitHub Action Run
19 run-4.0-gemfiles/rack_2_2.gemfile - 36924858285.19 01 Oct 2026 08:53PM UTC 166
98.77
GitHub Action Run
20 run-4.0-gemfiles/rails_8_0.gemfile - 36924858285.20 01 Oct 2026 08:53PM UTC 167
98.8
GitHub Action Run
21 run-4.0-gemfiles/dry_validation.gemfile - 36924858285.21 01 Oct 2026 08:54PM UTC 165
55.76
GitHub Action Run
22 run-3.4-gemfiles/rails_8_1.gemfile - 36924858285.22 01 Oct 2026 08:54PM UTC 167
98.8
GitHub Action Run
23 run-3.3-gemfiles/rails_7_2.gemfile - 36924858285.23 01 Oct 2026 08:53PM UTC 167
98.82
GitHub Action Run
24 run-4.0-gemfiles/rails_8_1.gemfile - 36924858285.24 01 Oct 2026 08:54PM UTC 167
98.8
GitHub Action Run
25 run-4.0-gemfiles/rails_7_2.gemfile - 36924858285.25 01 Oct 2026 08:53PM UTC 167
98.8
GitHub Action Run
26 run-3.4-gemfiles/rack_3_2.gemfile - 36924858285.26 01 Oct 2026 08:53PM UTC 166
98.8
GitHub Action Run
27 run-4.0-gemfiles/rack_3_2.gemfile - 36924858285.27 01 Oct 2026 08:54PM UTC 166
98.8
GitHub Action Run
28 run-3.4-gemfiles/rack_3_1.gemfile - 36924858285.28 01 Oct 2026 08:53PM UTC 166
98.8
GitHub Action Run
29 run-4.0-gemfiles/hashie.gemfile - 36924858285.29 01 Oct 2026 08:53PM UTC 165
59.8
GitHub Action Run
30 run-4.0-gemfiles/multi_json_1_20.gemfile - 36924858285.30 01 Oct 2026 08:54PM UTC 165
45.89
GitHub Action Run
31 run-4.0-Gemfile - 36924858285.31 01 Oct 2026 08:53PM UTC 166
98.8
GitHub Action Run
32 run-4.0-gemfiles/rack_3_1.gemfile - 36924858285.32 01 Oct 2026 08:54PM UTC 166
98.8
GitHub Action Run
Source Files on build 36924858285
  • Tree
  • List 167
  • 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 #36924858285
  • Pull Request #3023
  • PR Base - master (#36827966839)
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