diff --git a/packages/support/src/exceptions/getErrorMessage.ts b/packages/support/src/exceptions/getErrorMessage.ts index 7152fde7..8db2ecc0 100644 --- a/packages/support/src/exceptions/getErrorMessage.ts +++ b/packages/support/src/exceptions/getErrorMessage.ts @@ -8,7 +8,7 @@ */ export function getErrorMessage(error: unknown, defaultMessage: string = 'unknown reason'): string { - return (typeof error == 'object' && Reflect.has(error, 'message')) + return (typeof error == 'object' && error instanceof Error && Reflect.has(error, 'message')) ? error.message : defaultMessage; } \ No newline at end of file