getErrorProps MethodStatic

Returns a new ErrorProps object representing an unknown error value. Useful for logging or wrapping/re-throwing caught errors.

getErrorProps(error: unknown): ErrorProps

note Unlike Error objects (which lose messages and call stacks when serialized to JSON), objects returned by this are plain old JavaScript objects, and can be easily logged/serialized to JSON.

Parameter Type Description
error unknown  

Returns - ErrorProps

Defined in

Last Updated: 20 June, 2023