Fix remaining catch blocks

This commit is contained in:
gpt-engineer-app[bot]
2025-10-21 17:08:24 +00:00
parent e9ae019285
commit 81fccdc4d0
10 changed files with 112 additions and 56 deletions

View File

@@ -86,7 +86,7 @@ export function validateEmail(email: string): { valid: boolean; error?: string }
try {
emailSchema.parse(email);
return { valid: true };
} catch (error) {
} catch (error: unknown) {
if (error instanceof z.ZodError) {
return { valid: false, error: error.issues[0]?.message };
}
@@ -101,7 +101,7 @@ export function validateUrl(url: string): { valid: boolean; error?: string } {
try {
urlSchema.parse(url);
return { valid: true };
} catch (error) {
} catch (error: unknown) {
if (error instanceof z.ZodError) {
return { valid: false, error: error.issues[0]?.message };
}
@@ -116,7 +116,7 @@ export function validateUsername(username: string): { valid: boolean; error?: st
try {
usernameSchema.parse(username);
return { valid: true };
} catch (error) {
} catch (error: unknown) {
if (error instanceof z.ZodError) {
return { valid: false, error: error.issues[0]?.message };
}