@@ -60,11 +60,11 @@ export const action: ActionFunction = async ({ request }) => {
6060 } else {
6161 try {
6262 validateEmail ( email ) ;
63- } catch ( e ) {
64- if ( e instanceof Error ) {
65- fieldErrors . email = e . message ;
66- } else if ( typeof e === "string" ) {
67- fieldErrors . email = e ;
63+ } catch ( error : unknown ) {
64+ if ( error instanceof Error ) {
65+ fieldErrors . email = error . message ;
66+ } else if ( typeof error === "string" ) {
67+ fieldErrors . email = error ;
6868 } else {
6969 fieldErrors . email = "There was an error with this field" ;
7070 }
@@ -76,11 +76,11 @@ export const action: ActionFunction = async ({ request }) => {
7676 } else {
7777 try {
7878 validatePassword ( password ) ;
79- } catch ( e ) {
80- if ( e instanceof Error ) {
81- fieldErrors . password = e . message ;
82- } else if ( typeof e === "string" ) {
83- fieldErrors . password = e ;
79+ } catch ( error : unknown ) {
80+ if ( error instanceof Error ) {
81+ fieldErrors . password = error . message ;
82+ } else if ( typeof error === "string" ) {
83+ fieldErrors . password = error ;
8484 } else {
8585 fieldErrors . password = "There was an error with this field" ;
8686 }
@@ -95,12 +95,12 @@ export const action: ActionFunction = async ({ request }) => {
9595 let user : User | null ;
9696 try {
9797 user = await login ( email , password ) ;
98- } catch ( e ) {
98+ } catch ( error : unknown ) {
9999 let formError : string ;
100- if ( e instanceof Error ) {
101- formError = e . message ;
102- } else if ( typeof e === "string" ) {
103- formError = e ;
100+ if ( error instanceof Error ) {
101+ formError = error . message ;
102+ } else if ( typeof error === "string" ) {
103+ formError = error ;
104104 } else {
105105 formError = "There was an error logging in. Please try again later." ;
106106 }
0 commit comments