diff --git a/apps/web/src/components/forms/public-profile-form.tsx b/apps/web/src/components/forms/public-profile-form.tsx index b370b866c..3607d7fe1 100644 --- a/apps/web/src/components/forms/public-profile-form.tsx +++ b/apps/web/src/components/forms/public-profile-form.tsx @@ -91,7 +91,7 @@ export const PublicProfileForm = ({ case AppErrorCode.PROFILE_URL_TAKEN: form.setError('url', { type: 'manual', - message: error.userMessage, + message: error.message, }); break; diff --git a/packages/lib/server-only/user/update-public-profile.ts b/packages/lib/server-only/user/update-public-profile.ts index 1d6b05b9f..88a3ddba5 100644 --- a/packages/lib/server-only/user/update-public-profile.ts +++ b/packages/lib/server-only/user/update-public-profile.ts @@ -57,11 +57,7 @@ export const updatePublicProfile = async ({ userId, data }: UpdatePublicProfileO }); if (isUrlTakenByAnotherUser || isUrlTakenByAnotherTeam) { - throw new AppError( - AppErrorCode.PROFILE_URL_TAKEN, - 'Profile username is taken', - 'The profile username is already taken', - ); + throw new AppError(AppErrorCode.PROFILE_URL_TAKEN, 'The profile username is already taken'); } }