feat: enhance error handling for network-related issues in JMAPClient and auth-store #100

This commit is contained in:
Linus Rath
2026-03-26 13:04:34 +01:00
parent 47918aab1b
commit 4ff2bff974
3 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ interface AuthState {
const ERROR_PATTERNS: Array<{ key: string; matches: string[] }> = [
{ key: 'cors_blocked', matches: ['CORS_ERROR'] },
{ key: 'invalid_credentials', matches: ['Invalid username or password', '401', 'Unauthorized'] },
{ key: 'connection_failed', matches: ['network', 'Failed to fetch', 'NetworkError', 'ECONNREFUSED'] },
{ key: 'connection_failed', matches: ['network', 'Failed to fetch', 'NetworkError', 'ECONNREFUSED', 'Load failed', 'cancelled'] },
{ key: 'server_error', matches: ['500', '502', '503', '504', 'Internal Server Error', 'Service Unavailable'] },
];