Skip to content

415 Unsupported Media Type

You sent data in a format the server doesn’t understand. E.g., sending XML to an endpoint that only speaks JSON.

Use this if you expect a JSON body, but the client sends the data as raw text or XML.

import { HttpException, get } from 'shokupan';
export const getResource = get('/resource', () => {
throw new HttpException('Unsupported Media Type', 415);
});