function tooManyRequests
Since 0.1.0
tooManyRequests(
message: string,
details?: Readonly<Record<string, unknown>>
): HttpError

Creates a 429 Too Many Requests error.

Parameters

message: string

Human-readable error message

optional
details: Readonly<Record<string, unknown>>

Optional structured details (e.g. retryAfter)

Return Type

Usage

import { tooManyRequests } from "exceptions/src/index.ts";