Problem code
unsupported_media_type
| Status | 415 Unsupported Media Type |
| Type | https://api.librarika.dev.raynux.com/problems/unsupported_media_type |
| Title | Unsupported media type |
| Retry | Only after you fix the cause. |
| Headers | Accept-Patch: application/merge-patch+json on a PATCH |
What it means
The body's Content-Type is not accepted. POST bodies are application/json; PATCH bodies are application/merge-patch+json (RFC 7396) only, and a PATCH with plain application/json is refused.
What to do
Send the media type the operation takes.
Example
HTTP/1.1 415 Unsupported Media Type
Content-Type: application/problem+json
X-Request-ID: 01JD8Q3W6Y2N5K7M9P0R4S6T8V
{
"type": "https://api.librarika.dev.raynux.com/problems/unsupported_media_type",
"title": "Unsupported media type",
"status": 415,
"code": "unsupported_media_type",
"detail": "The request body of a PATCH must be application/merge-patch+json.",
"request_id": "01JD8Q3W6Y2N5K7M9P0R4S6T8V"
}
The type URI https://api.librarika.dev.raynux.com/problems/unsupported_media_type is this page. The detail above is an example of the English text; it is translated into the request's language and may change, so match on code, never on detail.