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

ruby-grape / grape / 36442099516
100%

Build:
DEFAULT BRANCH: master
Ran 28 Sep 2026 03:15PM UTC
Jobs 0
Files 0
Run time –
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

pending completion
36442099516

push

github

web-flow
Answer in the default format when a negotiated format cannot render the body (#3015)

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>
Source Files on build 36442099516
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #36442099516
  • e731a239 on github
  • Prev Build on master (#36440707714)
  • Next Build on master (#36480153850)
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