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

ruby-grape / grape / 26719477227 / 1
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: perf/lazy-response-cookies
DEFAULT BRANCH: master
Ran 31 May 2026 05:30PM UTC
Files 166
Run time 6s
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 May 2026 05:29PM UTC coverage: 95.672% (+0.006%) from 95.666%
26719477227.1

Pull #2751

github

ericproulx
Skip absent optional steps when composing structured error messages

`Grape::Exceptions::Base#compose_message` looped over every entry in
`MESSAGE_STEPS` (problem, summary, resolution) and translated each one
individually. For an optional step a message does not define — e.g.
`summary` on `invalid_message_body` — `Grape::Util::Translation#translate`
falls back to returning the scoped key path as a string. That string is
non-blank, so it passed the `detail.present?` guard and leaked verbatim:

    Summary:
      grape.errors.messages.invalid_message_body.summary

Gate each step on whether the already-resolved message hash defines it.
The resolved hash reflects the :en fallback, so locale fallback for
present steps is preserved, and the existing key-path behaviour for a
fully-unresolvable top-level message is untouched.

Fixes #2748.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pull Request #2751: Skip absent optional steps when composing structured error messages

1081 of 1193 branches covered (90.61%)

Branch coverage included in aggregate %.

3495 of 3590 relevant lines covered (97.35%)

967.82 hits per line

Source Files on job run-3.4-gemfiles/rails_8_1.gemfile - 26719477227.1
  • Tree
  • List 166
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 26719477227
  • 8eb2ac7f on github
  • Prev Job for on fix/2748-structured-message-leak (#26681995871.25)
  • Next Job for on fix/2748-structured-message-leak (#26720593550.19)
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