A string literal type that defines specific error types (e.g. 'PAYMENT_FAILED').
An object that describes additional details associated with the error.
OptionaldefaultOptional default error message.
Default type identifier for the error (e.g. 'PAYMENT_FAILED').
The name of the custom error class (e.g. 'PaymentFailedError').
Default HTTP status code to associate with the error (e.g. 400, 422).
Options for creating a custom error class.