diff --git a/src/components/errors/helpers/getErrorMessage.ts b/src/components/errors/helpers/getErrorMessage.ts index 3934ddf6..56e43bed 100644 --- a/src/components/errors/helpers/getErrorMessage.ts +++ b/src/components/errors/helpers/getErrorMessage.ts @@ -4,6 +4,8 @@ export const getErrorMessage = (error: unknown): string => { let msg = 'Unknown error'; if (error instanceof Error) { msg = `

${error.message}

`; + } else if (typeof error === 'string') { + return error; } return msg; };