Skip to content

408 Request Timeout

The server gave up waiting for the client to finish sending its request. Often caused by terrible network connections.

Use this if the client opens a connection but takes an absurdly long time to actually send the data, to protect your server from being tied up forever.

import { HttpException, get } from 'shokupan';
export const getResource = get('/resource', () => {
throw new HttpException('Request Timeout', 408);
});