UNSUPPORTED_MEDIA_TYPE — PATCH format or Content-Type not supported
cyoda-go version 0.8.2
errors.UNSUPPORTED_MEDIA_TYPE
Section titled “errors.UNSUPPORTED_MEDIA_TYPE”UNSUPPORTED_MEDIA_TYPE — the PATCH request used a format or Content-Type that is not supported.
SYNOPSIS
Section titled “SYNOPSIS”HTTP: 415 Unsupported Media Type. Retryable: no.
DESCRIPTION
Section titled “DESCRIPTION”Returned by PATCH in two situations:
- The
{format}path segment is notJSON. Merge patch is JSON-only; other format values (e.g.CSV) are not accepted for PATCH requests. - The
Content-Typeheader names a patch dialect that is not recognised. Onlyapplication/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.
RECOVERY
Section titled “RECOVERY”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.
SEE ALSO
Section titled “SEE ALSO”- errors
- errors.NOT_IMPLEMENTED
- errors.BAD_REQUEST
See also
Section titled “See also”cyoda help errors— Every error response from the Cyoda REST API carries a structurederrorCodein thepropertiesobject. Multiple codes may share the same HTTP status. Programmatic handling keys onerrorCode, 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 a404— 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.
Raw formats
Section titled “Raw formats”/help/errors/unsupported_media_type.json— full descriptor (matchesGET /help/{topic}envelope)/help/errors/unsupported_media_type.md— body only