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

ruby-grape / grape / 24635096923 / 36
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: regression/json-error-formatter-double-wrap
DEFAULT BRANCH: master
Ran 19 Apr 2026 05:41PM UTC
Files 152
Run time 4s
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

19 Apr 2026 05:38PM UTC coverage: 95.562% (+0.004%) from 95.558%
24635096923.36

Pull #2687

github

ericproulx
Skip backtrace capture on internal validation exceptions

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>
Pull Request #2687: Skip backtrace capture on internal validation exceptions

1045 of 1158 branches covered (90.24%)

Branch coverage included in aggregate %.

3305 of 3394 relevant lines covered (97.38%)

1034.41 hits per line

Source Files on job run-3.3-Gemfile - 24635096923.36
  • Tree
  • List 152
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 24635096923
  • e527b719 on github
  • Prev Job for on perf/skip-validation-backtrace (#24617960772.23)
  • Next Job for on perf/skip-validation-backtrace (#24693807954.26)
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