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

ruby-grape / grape / 33958239245
99%

Build:
DEFAULT BRANCH: master
Ran 05 Sep 2026 09:32AM UTC
Jobs 32
Files 169
Run time 1min
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

05 Sep 2026 09:31AM UTC coverage: 97.114% (+0.04%) from 97.072%
33958239245

push

github

web-flow
Make ErrorFormatter.formatter_for a lookup and move the fallback to its caller (#2902)

`formatter_for` took the API's `default_error_formatter` as a third argument
and ended in `default_error_formatter || Grape::ErrorFormatter::Txt`, so the
global registry implemented the caller's precedence with the caller's own
state. It was the only registry that did: `Parser.parser_for` answers nil and
lets the caller decide, `Formatter.formatter_for` falls back to a constant of
its own, and `ParamsBuilder.params_builder_for` raises.

Give it the `Parser.parser_for` shape — API registrations, then the registry,
then nil — and let `Middleware::Error` apply the fallback it owns, defaulting
`default_error_formatter` to `ErrorFormatter::Txt` in its `Options` alongside
`rescue_options` (both arrive as an explicit nil from
`Endpoint#error_middleware_options`, which bypasses the keyword defaults).

Resolution is unchanged, precedence included: a formatter registered for the
requested format still wins over the API's `default_error_formatter`, which
applies to formats that have none of their own.

Reporting the miss also lets the DSL see it. `default_error_formatter` names an
error formatter, so a name nothing is registered under now raises
`Grape::Exceptions::UnknownErrorFormatter` rather than storing the `Txt` the
lookup used to substitute, which read back as a working setting. `format` names
a format, where having no error formatter of its own is ordinary, so it still
succeeds and stores nil, with the middleware supplying `Txt` at render time.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

1240 of 1330 branches covered (93.23%)

Branch coverage included in aggregate %.

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

3 existing lines in 2 files now uncovered.

3943 of 4007 relevant lines covered (98.4%)

27183.28 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
95.24
1.12% lib/grape/middleware/error.rb
1
93.48
0.54% lib/grape/dsl/request_response.rb
Jobs
ID Job ID Ran Files Coverage
1 run-3.4-gemfiles/rack_3_1.gemfile - 33958239245.1 05 Sep 2026 09:32AM UTC 168
95.87
GitHub Action Run
2 run-4.0-gemfiles/rails_7_2.gemfile - 33958239245.2 05 Sep 2026 09:32AM UTC 169
95.88
GitHub Action Run
3 run-4.0-gemfiles/hashie.gemfile - 33958239245.3 05 Sep 2026 09:32AM UTC 167
61.81
GitHub Action Run
4 run-3.3-gemfiles/rails_8_1.gemfile - 33958239245.4 05 Sep 2026 09:32AM UTC 169
95.88
GitHub Action Run
5 run-4.0-gemfiles/rack_3_1.gemfile - 33958239245.5 05 Sep 2026 09:32AM UTC 168
95.87
GitHub Action Run
6 run-3.4-gemfiles/rack_2_2.gemfile - 33958239245.6 05 Sep 2026 09:32AM UTC 168
95.84
GitHub Action Run
7 run-3.4-Gemfile - 33958239245.7 05 Sep 2026 09:32AM UTC 168
95.87
GitHub Action Run
8 run-3.3-gemfiles/rails_7_2.gemfile - 33958239245.8 05 Sep 2026 09:32AM UTC 169
95.88
GitHub Action Run
9 run-3.3-gemfiles/rack_3_2.gemfile - 33958239245.9 05 Sep 2026 09:32AM UTC 168
95.87
GitHub Action Run
10 run-3.3-gemfiles/rack_2_2.gemfile - 33958239245.10 05 Sep 2026 09:32AM UTC 168
95.83
GitHub Action Run
11 run-4.0-gemfiles/rack_2_2.gemfile - 33958239245.11 05 Sep 2026 09:32AM UTC 168
95.84
GitHub Action Run
12 run-4.0-gemfiles/multi_json.gemfile - 33958239245.12 05 Sep 2026 09:32AM UTC 167
47.58
GitHub Action Run
13 run-4.0-gemfiles/grape_swagger.gemfile - 33958239245.13 05 Sep 2026 09:32AM UTC 167
55.31
GitHub Action Run
14 run-4.0-gemfiles/rack_3_2.gemfile - 33958239245.14 05 Sep 2026 09:32AM UTC 168
95.87
GitHub Action Run
15 run-4.0-gemfiles/rails_8_1.gemfile - 33958239245.15 05 Sep 2026 09:32AM UTC 169
95.88
GitHub Action Run
16 run-3.4-gemfiles/rails_8_1.gemfile - 33958239245.16 05 Sep 2026 09:32AM UTC 169
95.88
GitHub Action Run
17 run-3.4-gemfiles/rails_8_0.gemfile - 33958239245.17 05 Sep 2026 09:32AM UTC 169
95.88
GitHub Action Run
18 run-4.0-Gemfile - 33958239245.18 05 Sep 2026 09:32AM UTC 168
95.87
GitHub Action Run
19 run-3.3-Gemfile - 33958239245.19 05 Sep 2026 09:32AM UTC 168
95.87
GitHub Action Run
20 run-4.0-gemfiles/grape_entity.gemfile - 33958239245.20 05 Sep 2026 09:32AM UTC 167
50.37
GitHub Action Run
21 run-3.4-gemfiles/rack_3_2.gemfile - 33958239245.21 05 Sep 2026 09:32AM UTC 168
95.87
GitHub Action Run
22 run-3.3-gemfiles/rack_3_1.gemfile - 33958239245.22 05 Sep 2026 09:32AM UTC 168
95.87
GitHub Action Run
23 run-4.0-gemfiles/rack_3_0.gemfile - 33958239245.23 05 Sep 2026 09:32AM UTC 168
95.87
GitHub Action Run
24 run-4.0-gemfiles/multi_json_1_20.gemfile - 33958239245.24 05 Sep 2026 09:32AM UTC 167
47.62
GitHub Action Run
25 run-3.3-gemfiles/rack_3_0.gemfile - 33958239245.25 05 Sep 2026 09:32AM UTC 168
95.87
GitHub Action Run
26 run-3.4-gemfiles/rack_3_0.gemfile - 33958239245.26 05 Sep 2026 09:32AM UTC 168
95.87
GitHub Action Run
27 run-3.4-gemfiles/rails_7_2.gemfile - 33958239245.27 05 Sep 2026 09:32AM UTC 169
95.88
GitHub Action Run
28 run-3.3-gemfiles/rails_8_0.gemfile - 33958239245.28 05 Sep 2026 09:32AM UTC 169
95.88
GitHub Action Run
29 run-4.0-gemfiles/multi_xml.gemfile - 33958239245.29 05 Sep 2026 09:32AM UTC 167
47.07
GitHub Action Run
30 run-4.0-gemfiles/rails_8_0.gemfile - 33958239245.30 05 Sep 2026 09:32AM UTC 169
95.88
GitHub Action Run
31 run-4.0-gemfiles/multi_xml_0_8.gemfile - 33958239245.31 05 Sep 2026 09:32AM UTC 167
47.11
GitHub Action Run
32 run-4.0-gemfiles/dry_validation.gemfile - 33958239245.32 05 Sep 2026 09:32AM UTC 167
57.81
GitHub Action Run
Source Files on build 33958239245
  • Tree
  • List 169
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #33958239245
  • 17bf3458 on github
  • Prev Build on master (#33936310835)
  • Next Build on master (#33984725552)
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