The error label or code corresponding to a built-in error type.
Optionalmessage: string
Optional custom error message.
Optionaldetails: ErrorOptions
Optional additional error details.
A new instance of the specified error type, or an Unknown error if the label/code is not recognized.
Creates a new error instance based on the provided label or code.