ssdsds
This commit is contained in:
@@ -1988,11 +1988,14 @@ export async function addSeedKeywordsToWorkflow(seedKeywordIds: number[], siteId
|
||||
|
||||
return { success: true, ...response } as any;
|
||||
} catch (error: any) {
|
||||
// Error responses are thrown by fetchAPI, but wrap them for consistency
|
||||
if (error.response && typeof error.response === 'object') {
|
||||
return { success: false, error: error.message, ...error.response } as any;
|
||||
}
|
||||
throw error;
|
||||
// Error responses are thrown by fetchAPI - return as failed result instead of re-throwing
|
||||
// This allows component to handle limit errors gracefully
|
||||
return {
|
||||
success: false,
|
||||
created: 0,
|
||||
skipped: 0,
|
||||
errors: [error.message || 'Failed to add keywords']
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user