@@ -60,11 +60,11 @@ export const action: ActionFunction = async ({ request }) => {
60
60
} else {
61
61
try {
62
62
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 ;
68
68
} else {
69
69
fieldErrors . email = "There was an error with this field" ;
70
70
}
@@ -76,11 +76,11 @@ export const action: ActionFunction = async ({ request }) => {
76
76
} else {
77
77
try {
78
78
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 ;
84
84
} else {
85
85
fieldErrors . password = "There was an error with this field" ;
86
86
}
@@ -95,12 +95,12 @@ export const action: ActionFunction = async ({ request }) => {
95
95
let user : User | null ;
96
96
try {
97
97
user = await login ( email , password ) ;
98
- } catch ( e ) {
98
+ } catch ( error : unknown ) {
99
99
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 ;
104
104
} else {
105
105
formError = "There was an error logging in. Please try again later." ;
106
106
}
0 commit comments