Refactor site building workflow and context handling; update API response structure for improved clarity and consistency. Adjust frontend components to align with new data structure, including error handling and loading states.

This commit is contained in:
IGNY8 VPS (Salman)
2025-11-20 21:50:16 +00:00
parent 781052c719
commit 1b4cd59e5b
24 changed files with 386 additions and 164 deletions

View File

@@ -111,15 +111,14 @@ export default function IndustriesSectorsKeywords() {
} catch (error: any) {
if (error instanceof AccountSettingsError) {
if (error.type === 'ACCOUNT_SETTINGS_NOT_FOUND') {
console.debug('No saved user preferences yet.');
// Preferences don't exist yet - this is expected for new users
return;
}
console.warn('Failed to load user preferences:', error);
toast.error(getAccountSettingsPreferenceMessage(error));
// For other errors (500, etc.), silently handle - user can still use the page
// Don't show error toast for server errors - graceful degradation
return;
}
console.warn('Failed to load user preferences:', error);
toast.error('Unable to load your saved preferences right now.');
// For non-AccountSettingsError errors, silently handle - graceful degradation
}
};