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

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

Build:
Build:
LAST BUILD BRANCH: fix/negotiated-format-fallback
DEFAULT BRANCH: master
Ran 26 Sep 2026 03:19PM UTC
Jobs 32
Files 166
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

26 Sep 2026 03:18PM UTC coverage: 100.0%. Remained the same
36251478436

Pull #3015

github

ericproulx
Answer in the default format when a negotiated format cannot render the body

On an API that pins no format, content negotiation can pick a format
the endpoint's body cannot be rendered in. A browser's Accept header
(text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8)
negotiates XML at q=0.9, and axios's (application/json, text/plain, */*)
ties at q=1 and Rack picks the first registered type, XML. The XML
formatter cannot render a String, so every endpoint returning one
answered those clients with a 500 ("cannot convert String to xml"), as
did `.xml` and `?format=xml`.

When the negotiated formatter raises InvalidFormatter, the Formatter now
renders the body in the default format, with its content type. It does
so only while the format is the client's alone: an API that pins a
format, an endpoint that set a Content-Type, or one that switched
`api_format` still answers 500, since a body that does not fit a choice
the API made is the API's error. If the default format cannot render
the body either, the 500 stands.

`api_spec.rb`'s "sets content type for xml" requested `/foo.xml` from an
endpoint returning a String, so it was checking the content type of that
500; it now requests a body XML can render.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Pull Request #3015: Answer in the default format when a negotiated format cannot render the body

1498 of 1498 branches covered (100.0%)

Branch coverage included in aggregate %.

18 of 18 new or added lines in 1 file covered. (100.0%)

4327 of 4327 relevant lines covered (100.0%)

29202.17 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/multi_xml_0_8.gemfile - 36251478436.1 26 Sep 2026 03:19PM UTC 164
45.64
GitHub Action Run
2 run-3.4-gemfiles/rack_3_0.gemfile - 36251478436.2 26 Sep 2026 03:19PM UTC 165
98.81
GitHub Action Run
3 run-4.0-gemfiles/multi_json_1_20.gemfile - 36251478436.3 26 Sep 2026 03:19PM UTC 164
45.95
GitHub Action Run
4 run-4.0-gemfiles/rack_3_0.gemfile - 36251478436.4 26 Sep 2026 03:21PM UTC 165
98.81
GitHub Action Run
5 run-4.0-gemfiles/rails_7_2.gemfile - 36251478436.5 26 Sep 2026 03:20PM UTC 166
98.82
GitHub Action Run
6 run-4.0-gemfiles/multi_json.gemfile - 36251478436.6 26 Sep 2026 03:20PM UTC 164
45.92
GitHub Action Run
7 run-3.3-gemfiles/rack_3_1.gemfile - 36251478436.7 26 Sep 2026 03:20PM UTC 165
98.83
GitHub Action Run
8 run-3.4-Gemfile - 36251478436.8 26 Sep 2026 03:19PM UTC 165
98.81
GitHub Action Run
9 run-4.0-gemfiles/grape_swagger.gemfile - 36251478436.9 26 Sep 2026 03:21PM UTC 164
53.2
GitHub Action Run
10 run-3.3-Gemfile - 36251478436.10 26 Sep 2026 03:19PM UTC 165
98.83
GitHub Action Run
11 run-3.4-gemfiles/rails_8_1.gemfile - 36251478436.11 26 Sep 2026 03:20PM UTC 166
98.82
GitHub Action Run
12 run-4.0-gemfiles/rack_3_1.gemfile - 36251478436.12 26 Sep 2026 03:19PM UTC 165
98.81
GitHub Action Run
13 run-4.0-gemfiles/grape_entity.gemfile - 36251478436.13 26 Sep 2026 03:19PM UTC 164
48.68
GitHub Action Run
14 run-3.3-gemfiles/rack_3_2.gemfile - 36251478436.14 26 Sep 2026 03:19PM UTC 165
98.83
GitHub Action Run
15 run-3.3-gemfiles/rails_8_0.gemfile - 36251478436.15 26 Sep 2026 03:20PM UTC 166
98.83
GitHub Action Run
16 run-4.0-gemfiles/dry_validation.gemfile - 36251478436.16 26 Sep 2026 03:19PM UTC 164
55.77
GitHub Action Run
17 run-4.0-gemfiles/rails_8_0.gemfile - 36251478436.17 26 Sep 2026 03:20PM UTC 166
98.82
GitHub Action Run
18 run-3.3-gemfiles/rack_3_0.gemfile - 36251478436.18 26 Sep 2026 03:20PM UTC 165
98.83
GitHub Action Run
19 run-3.3-gemfiles/rails_8_1.gemfile - 36251478436.19 26 Sep 2026 03:19PM UTC 166
98.83
GitHub Action Run
20 run-4.0-gemfiles/hashie.gemfile - 36251478436.20 26 Sep 2026 03:20PM UTC 164
59.85
GitHub Action Run
21 run-3.4-gemfiles/rack_3_2.gemfile - 36251478436.21 26 Sep 2026 03:19PM UTC 165
98.81
GitHub Action Run
22 run-4.0-gemfiles/multi_xml.gemfile - 36251478436.22 26 Sep 2026 03:19PM UTC 164
45.61
GitHub Action Run
23 run-3.4-gemfiles/rack_3_1.gemfile - 36251478436.23 26 Sep 2026 03:19PM UTC 165
98.81
GitHub Action Run
24 run-3.4-gemfiles/rails_8_0.gemfile - 36251478436.24 26 Sep 2026 03:19PM UTC 166
98.82
GitHub Action Run
25 run-4.0-Gemfile - 36251478436.25 26 Sep 2026 03:19PM UTC 165
98.81
GitHub Action Run
26 run-4.0-gemfiles/rails_8_1.gemfile - 36251478436.26 26 Sep 2026 03:19PM UTC 166
98.82
GitHub Action Run
27 run-4.0-gemfiles/rack_3_2.gemfile - 36251478436.27 26 Sep 2026 03:19PM UTC 165
98.81
GitHub Action Run
28 run-3.3-gemfiles/rack_2_2.gemfile - 36251478436.28 26 Sep 2026 03:19PM UTC 165
98.8
GitHub Action Run
29 run-3.4-gemfiles/rack_2_2.gemfile - 36251478436.29 26 Sep 2026 03:20PM UTC 165
98.78
GitHub Action Run
30 run-4.0-gemfiles/rack_2_2.gemfile - 36251478436.30 26 Sep 2026 03:19PM UTC 165
98.78
GitHub Action Run
31 run-3.3-gemfiles/rails_7_2.gemfile - 36251478436.31 26 Sep 2026 03:19PM UTC 166
98.83
GitHub Action Run
32 run-3.4-gemfiles/rails_7_2.gemfile - 36251478436.32 26 Sep 2026 03:19PM UTC 166
98.82
GitHub Action Run
Source Files on build 36251478436
  • Tree
  • List 166
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #36251478436
  • Pull Request #3015
  • PR Base - master (#36249622083)
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