Merge pull request #330 from documenso/feat/profile-password-form

feat: avoid user from updating password with the same password
This commit is contained in:
Lucas Smith
2023-08-30 14:32:21 +10:00
committed by GitHub
3 changed files with 20 additions and 6 deletions

View File

@ -40,12 +40,16 @@ export const profileRouter = router({
password,
});
} catch (err) {
console.error(err);
let message =
'We were unable to update your profile. Please review the information you provided and try again.';
if (err instanceof Error) {
message = err.message;
}
throw new TRPCError({
code: 'BAD_REQUEST',
message:
'We were unable to update your profile. Please review the information you provided and try again.',
message,
});
}
}),