This commit is contained in:
IGNY8 VPS (Salman)
2025-12-12 18:57:46 +00:00
parent a3f817a292
commit 9824e9a4dc
5 changed files with 60 additions and 796 deletions

View File

@@ -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']
};
}
}