The Open Source DocuSign Alternative.
TypeScript digital-signaturedocument-signingdocusign-alternativee-signatureesignesignaturenext-authnextjsopen-sourcepades-standardpdfpdf-signpdf-signaturepostgresqlprismaself-hostedsigningtypescript
feat: better error handling in forgotPassword trpc router
Ephraim Atta-Duncan1e0cde850a7f
diff --git a/packages/trpc/server/profile-router/router.ts b/packages/trpc/server/profile-router/router.tsindex de61f64f4..adbb93a80 100644--- a/packages/trpc/server/profile-router/router.ts+++ b/packages/trpc/server/profile-router/router.ts@@ -69,13 +69,16 @@ export const profileRouter = router({email,});} 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;+ }- // TODO: Handle this error betterthrow new TRPCError({code: 'BAD_REQUEST',- message:- 'We were unable to update your profile. Please review the information you provided and try again.',+ message,});}}),