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

ruby-grape / grape / 24693877550 / 15
97%
master: 97%

Build:
DEFAULT BRANCH: master
Ran 20 Apr 2026 10:36PM UTC
Files 155
Run time 5s
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

20 Apr 2026 10:35PM UTC coverage: 95.609% (+0.004%) from 95.605%
24693877550.15

push

github

web-flow
Skip backtrace capture on internal validation exceptions (#2687)

Grape::Exceptions::Validation is raised once per bad attribute on every
failing request; Grape::Exceptions::ValidationArrayErrors wraps them and
is raised once per validator. Both are caught internally by
Endpoint#run_validators and their backtraces are never surfaced — they
point into Grape's own validator stack, not user code, and have no
diagnostic value.

Ruby's +raise+ only captures a backtrace if the exception's backtrace
ivar is nil. Pre-seeding it via +set_backtrace(EMPTY_BACKTRACE)+ in
+initialize+ makes +raise+ skip the C-level +make_backtrace+ call
entirely. At representative prod stack depth (80-150 frames) this saves
~1-2 µs per raise.

The outer Grape::Exceptions::ValidationErrors is untouched — its
backtrace is preserved for anyone doing +rescue_from ValidationErrors+
or shipping validation failures to error-reporting tools.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

1045 of 1155 branches covered (90.48%)

Branch coverage included in aggregate %.

3310 of 3400 relevant lines covered (97.35%)

1007.32 hits per line

Source Files on job run-4.0-gemfiles/rails_8_1.gemfile - 24693877550.15
  • Tree
  • List 155
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 24693877550
  • 5ad002db on github
  • Prev Job for on master (#24693774069.8)
  • Next Job for on master (#24699723680.31)
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