KuzzleError #

Inherits from the standard Javascript Error object: abstract class inherited by all Kuzzle error objects.

This class can be used to create new standardized Kuzzle error objects for API responses.


constructor(message: string | Error, status: number, id?: string, code?: number)

ArgumentTypeDescription
message
string | Error
Error message. If an Error is passed, its message and stack trace are kept
status
number
Error status code (Kuzzle's API errors follow the HTTP standard)
id
string
(optional) Error unique name
code
number
(optional) Error unique code