TooManyRequestsError #
Inherits from KuzzleError.
This error object is used when a request is refused because too many requests, or a concurrent task, are already being processed.
constructor(message: string, id?: string, code?: number)| Argument | Type | Description |
|---|---|---|
message | string | Error message |
id | string | (optional) Error unique name |
code | number | (optional) Error unique code |
Usage #
import { TooManyRequestsError } from 'kuzzle';
throw new TooManyRequestsError('That task is already ongoing');