feat: better error handling and better toast messages

This commit is contained in:
Ephraim Atta-Duncan
2023-09-18 15:09:41 +00:00
parent 45f447c796
commit 079963cde8
6 changed files with 76 additions and 45 deletions

View File

@ -69,8 +69,7 @@ export const profileRouter = router({
email,
});
} catch (err) {
let message =
'We were unable to update your profile. Please review the information you provided and try again.';
let message = 'We were unable to send your email. Please try again.';
if (err instanceof Error) {
message = err.message;
@ -92,8 +91,7 @@ export const profileRouter = router({
password,
});
} catch (err) {
let message =
'We were unable to update your profile. Please review the information you provided and try again.';
let message = 'We were unable to reset your password. Please try again.';
if (err instanceof Error) {
message = err.message;