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

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

Build:
Build:
LAST BUILD BRANCH: fix/error-raises
DEFAULT BRANCH: master
Ran 01 Oct 2026 08:50PM UTC
Jobs 15
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:49PM UTC coverage: 99.173%. First build
36924481099

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 #with, against about 120 ns.
It answers only what Grape reads off it, its readers and #with, and
stays frozen. 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

1501 of 1513 branches covered (99.21%)

Branch coverage included in aggregate %.

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

4372 of 4409 relevant lines covered (99.16%)

14798.54 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/rails_8_0.gemfile - 36924481099.1 01 Oct 2026 08:51PM UTC 167
98.8
GitHub Action Run
2 run-4.0-gemfiles/grape_entity.gemfile - 36924481099.2 01 Oct 2026 08:51PM UTC 165
48.78
GitHub Action Run
3 run-3.4-gemfiles/rack_2_2.gemfile - 36924481099.3 01 Oct 2026 08:50PM UTC 166
98.77
GitHub Action Run
4 run-3.4-gemfiles/rails_7_2.gemfile - 36924481099.4 01 Oct 2026 08:50PM UTC 167
98.8
GitHub Action Run
5 run-3.4-gemfiles/rails_8_0.gemfile - 36924481099.5 01 Oct 2026 08:50PM UTC 167
98.8
GitHub Action Run
6 run-3.4-Gemfile - 36924481099.6 01 Oct 2026 08:50PM UTC 166
98.8
GitHub Action Run
7 run-3.3-gemfiles/rails_7_2.gemfile - 36924481099.7 01 Oct 2026 08:50PM UTC 167
98.82
GitHub Action Run
8 run-4.0-gemfiles/rack_3_0.gemfile - 36924481099.8 01 Oct 2026 08:50PM UTC 166
98.8
GitHub Action Run
9 run-3.3-gemfiles/rack_3_1.gemfile - 36924481099.9 01 Oct 2026 08:50PM UTC 166
98.82
GitHub Action Run
10 run-4.0-gemfiles/rack_3_2.gemfile - 36924481099.10 01 Oct 2026 08:50PM UTC 166
98.8
GitHub Action Run
11 run-4.0-gemfiles/rails_7_2.gemfile - 36924481099.11 01 Oct 2026 08:50PM UTC 167
98.8
GitHub Action Run
12 run-4.0-gemfiles/grape_swagger.gemfile - 36924481099.12 01 Oct 2026 08:51PM UTC 165
53.09
GitHub Action Run
13 run-4.0-gemfiles/rack_2_2.gemfile - 36924481099.13 01 Oct 2026 08:50PM UTC 166
98.77
GitHub Action Run
14 run-4.0-gemfiles/multi_xml_0_8.gemfile - 36924481099.14 01 Oct 2026 08:50PM UTC 165
45.59
GitHub Action Run
15 run-3.3-gemfiles/rails_8_0.gemfile - 36924481099.15 01 Oct 2026 08:50PM UTC 167
98.82
GitHub Action Run
Source Files on build 36924481099
  • 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 #36924481099
  • 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