diff --git a/src/hooks/useAuth.ts b/src/hooks/useAuth.ts index 6037d3f..5d3a8a8 100644 --- a/src/hooks/useAuth.ts +++ b/src/hooks/useAuth.ts @@ -16,11 +16,12 @@ export const useAuth = ({ middleware, redirectIfAuthenticated }: { middleware?: }), { shouldRetryOnError: (error) => { - // Never retry on 401 Unauthorized or 409 Conflict - if (error.response?.status === 401 || error.response?.status === 409) { + const status = error?.response?.status; + if (status === 401 || status === 409) { + console.log('[useAuth] Blocking retry for status:', status); return false; } - // Retry for other errors (network issues, 500s) + console.log('[useAuth] Retrying for error:', error); return true; } }