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:
@@ -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
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user