Skip to content
Settings

UNSUPPORTED_MEDIA_TYPE — PATCH format or Content-Type not supported

cyoda-go version 0.8.2

UNSUPPORTED_MEDIA_TYPE — the PATCH request used a format or Content-Type that is not supported.

HTTP: 415 Unsupported Media Type. Retryable: no.

Returned by PATCH in two situations:

  • The {format} path segment is not JSON. Merge patch is JSON-only; other format values (e.g. CSV) are not accepted for PATCH requests.
  • The Content-Type header names a patch dialect that is not recognised. Only application/merge-patch+json (RFC 7386) is implemented.

Note that application/json-patch+json (RFC 6902, JSON Patch) is a recognised dialect but is not implemented; requests using that content type receive 501 NOT_IMPLEMENTED, not 415.

Not retryable as-is — the same request produces the same error until the format or content type is corrected.

Use JSON as the {format} path segment and set Content-Type: application/merge-patch+json in the request. Merge patch (RFC 7386) describes the delta as a JSON object whose keys are merged into the stored entity; keys present in the patch overwrite stored values, and keys explicitly set to null remove the field.

  • errors
  • errors.NOT_IMPLEMENTED
  • errors.BAD_REQUEST
  • cyoda help errors — Every error response from the Cyoda REST API carries a structured errorCode in the properties object. Multiple codes may share the same HTTP status. Programmatic handling keys on errorCode, not HTTP status.
  • cyoda help errors NOT_IMPLEMENTED — The route is defined and accepted by the server but the handler returns this error because the feature is pending implementation. Distinct from a 404 — the endpoint exists without a functional implementation.
  • cyoda help errors BAD_REQUEST — Fired when the server cannot parse or structurally process the incoming request. Common triggers include invalid JSON, missing required fields, unsupported format specifiers, or mutually exclusive parameters being set simultaneously.