Skip to content

Unsupported Media Type (unsupported-media-type)

PubNio unsupported-media-type problem, HTTP 415: The request body's Content-Type is not one the operation accepts, such as text/plain sent to a JSON operation.

HTTP 415 Unsupported Media Type. The request body’s Content-Type is not one the operation accepts, such as text/plain sent to a JSON operation.

When it happens

The request never reaches the handler.

No operation declares it: any operation that takes a body can return it.

Response body

{
  "type": "https://pubnio.com/docs/problems/unsupported-media-type/",
  "status": 415,
  "title": "Unsupported Media Type",
  "detail": "This operation does not accept Content-Type text/plain.",
  "code": "unsupported_media_type",
  "nextAction": "Send the body as the media type its operation lists in /api/v1/openapi.",
  "requestId": "0f8e4c2a-6b1d-4e3f-8a9b-7c6d5e4f3a21"
}
Field Type Always present
nextAction string Yes

Recovery for agents

  • Do what nextAction says.

Retryable

No: the SDKs mark HTTP 415 not retryable.

Limits

  • Match on type or code, not on detail.

Type to search…

↑↓ navigate↵ selectEsc close