Skip to content

fix(worker): stop retrying ai file embeddings rejected for an invalid api key - #1689

Merged
nguyenvantruc92 merged 1 commit into
mainfrom
fix/embedding-invalid-api-key
Nov 10, 2026
Merged

nguyenvantruc92 merged 1 commit into
mainfrom
fix/embedding-invalid-api-key

Conversation

@nguyenvantruc92

Copy link
Copy Markdown
Contributor

An embedding chunk whose OpenAI or Gemini key was wrong retried on every
attempt, and the failure only reached the worker log and Bull Board, so the
workspace never saw why its file stayed unindexed.

  • add isInvalidApiKeyError to @chatbotx.io/ai: 401/403, plus Gemini's
    400 API_KEY_INVALID
  • processPendingEmbedding records the failure on the workspace Error Logs
    and throws UnrecoverableError instead of retrying
  • markEmbeddingChunkFailed also marks the chunk error on an
    UnrecoverableError, so the file does not stay processing; a reindex
    retries it once the key is fixed

@nguyenvantruc92 nguyenvantruc92 changed the title stop retrying ai file embeddings rejected for an invalid api key fix(worker): stop retrying ai file embeddings rejected for an invalid api key Nov 10, 2026
@github-actions github-actions Bot added the bug Something isn't working as expected label Nov 10, 2026
@nguyenvantruc92
nguyenvantruc92 merged commit 944d433 into main Nov 10, 2026
16 checks passed
hello-jackytruong referenced this pull request in hello-jackytruong/ChatWorkAI Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant