/**
* Helper function to get a string representation of an error.
* @param error unknown
* @returns a string representation of the error
*/exportfunctiongetErrorMessage(error: unknown): string {
if (error instanceofError) {
return error.message;
}
returnString(error);
}