Optionalopt: { cause?: string }Optional ReadonlycauseReadonlycodeThe user's defined error code. It can be varied depending on the application needs.
ReadonlymessageThe error message
ReadonlynameReadonlystackThe stack trace of the error.
Implements the JSON.stringify() behavior.
It uses toStruct to get the plain object structure under the hood.
It is encouraged to use toStruct instead of this method because it provides better
clarity and expressiveness about the data structure being serialized. This method is provided
only to support the JSON.stringify() serialization.
A plain object structure containing the model's serializable properties.
Converts the model instance into a plain data structure (struct).
This method extracts the model's property data, removing functions, methods, or class-specific instance details, returning a clean structural representation.
A plain object structure containing the model's serializable properties.
The customized cause of the error.