ALwrity Backend and Frontend - Stability and Error Handling Improvements

This commit is contained in:
ajaysi
2025-10-14 10:57:16 +05:30
parent b6debd80b7
commit 40fb6ac95b
31 changed files with 1491 additions and 592 deletions

View File

@@ -64,6 +64,13 @@ export const SubscriptionProvider: React.FC<SubscriptionProviderProps> = ({ chil
setSubscription(subscriptionData);
} catch (err) {
console.error('Error checking subscription:', err);
// Check if it's a connection error that should be handled at the app level
if (err instanceof Error && (err.name === 'NetworkError' || err.name === 'ConnectionError')) {
// Re-throw connection errors to be handled by the app-level error boundary
throw err;
}
setError(err instanceof Error ? err.message : 'Failed to check subscription');
// Default to free tier on error