Cognigy.AI KB update payload failing on embedding index limit with TypeScript

Trying to push a batch of updated document sets to the Cognigy.AI knowledge base endpoint using TypeScript. The payload construction handles the content streams and metadata matrices fine, but the async ingestion job keeps bombing out with a 422 error once the embedding index hits the threshold.

const payload = {
 contentStream: fs.createReadStream('docs.json'),
 metadataMatrix: { attr: ['priority', 'region'], values: [['high', 'latam']] },
 versionDirective: 'force_update',
 chunkingConfig: { strategy: 'semantic', maxTokens: 512 }
};

await fetch('https://api.cognigy.ai/v1/knowledge/documents', {
 method: 'PATCH',
 headers: { 'Authorization': `Bearer ${token}` },
 body: JSON.stringify(payload)
});

Quota validation runs before the preprocessing trigger fires. Rejections happen on the whole batch instead of splitting it. It’s rejecting everything. Need to intercept that index limit check and throttle the chunking pipeline dynamically. Webhook callbacks to the external CMS are timing out anyway. Latency tracking is a mess right now. Audit logs aren’t generating either. Retry logic around the async job status endpoint is blocking the main thread