Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Fix error message

Blue Mousebbdd05a3e237
diff --git a/web/app/pages/Project/Settings/People/People.tsx b/web/app/pages/Project/Settings/People/People.tsx
index 7e27849b9..34f2bb877 100644
--- a/web/app/pages/Project/Settings/People/People.tsx
+++ b/web/app/pages/Project/Settings/People/People.tsx
@@ -250,9 +250,9 @@ const People: React.FunctionComponent<IPeopleProps> = ({
const results = await shareProject(id, { email: form.email, role: form.role })
setProjectShareData({ share: results.share }, id)
toast.success(t('apiNotifications.userInvited'))
- } catch (e) {
- console.error(`[ERROR] Error while inviting a user: ${e}`)
- toast.error(t('apiNotifications.userInviteError'))
+ } catch (reason) {
+ console.error(`[ERROR] Error while inviting a user: ${reason}`)
+ toast.error(typeof reason === 'string' ? reason : t('apiNotifications.userInviteError'))
}
// a timeout is needed to prevent the flicker of data fields in the modal when closing