Skip to main content

Function: toError()

toError(error, message?): Error

Defined in: src/errors/temporal-client-error.ts:44

Normalize a thrown value to an Error. Errors pass through untouched; anything else is wrapped with message and the original value as cause.

Parameters​

error​

unknown

message?​

string = 'Unknown error'

Returns​

Error