﻿# UNSUPPORTED_MEDIA_TYPE — PATCH format or Content-Type not supported

Returned by PATCH in two situations:

<em>cyoda-go version <a href="https://github.com/Cyoda/cyoda-go/releases/tag/v0.8.2">0.8.2</a></em>

# errors.UNSUPPORTED_MEDIA_TYPE

## NAME

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

## SYNOPSIS

HTTP: `415` `Unsupported Media Type`. Retryable: `no`.

## DESCRIPTION

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.

## 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

- errors
- errors.NOT_IMPLEMENTED
- errors.BAD_REQUEST

## See also

- [`cyoda help errors`](/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`](/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`](/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

- [`/help/errors/unsupported_media_type.json`](/help/errors/unsupported_media_type.json) — full descriptor (matches `GET /help/{topic}` envelope)
- [`/help/errors/unsupported_media_type.md`](/help/errors/unsupported_media_type.md) — body only