feat: enhance login error handling and add server unavailable message (#516)

This commit is contained in:
samanhappy
2025-12-17 13:24:07 +08:00
committed by GitHub
parent 292876a991
commit 350a022ea3
7 changed files with 58 additions and 12 deletions

View File

@@ -29,7 +29,7 @@ export const login = async (credentials: LoginCredentials): Promise<AuthResponse
console.error('Login error:', error);
return {
success: false,
message: 'An error occurred during login',
message: error instanceof Error ? error.message : 'An error occurred during login',
};
}
};