Skip to content

413 Content Too Large

You tried to upload a baby hippo and the server only accepts hamsters. The payload is too big.

Use this to reject massive uploads. If you set a 5MB limit for profile pictures, and they upload a 10GB file, throw a 413 to protect your server’s disk space.

import { HttpException, get } from 'shokupan';
export const getResource = get('/resource', () => {
throw new HttpException('Content Too Large', 413);
});