{"record":{"id":"e7063f6d2cf61f90","repo":"chroma-core/chroma","slug":"quota-exceeded","errorCode":null,"errorMessage":"Quota exceeded","messagePattern":"Quota exceeded","errorType":"http","errorClass":"ChromaQuotaExceededError","httpStatus":422,"severity":"error","filePath":"clients/new-js/packages/chromadb/src/chroma-fetch.ts","lineNumber":117,"sourceCode":"      const preconditionBody = await getErrorBody(response);\n      if (preconditionBody.error === \"StaleReadError\") {\n        throw new ChromaStaleReadError(\n          preconditionBody.message || \"stale read\",\n        );\n      }\n      throw new ChromaClientError(\n        preconditionBody.message || \"Precondition Failed\",\n      );\n    case 422:\n      try {\n        const body = await response.json();\n        if (\n          body &&\n          body.message &&\n          (body.message.startsWith(\"Quota exceeded\") ||\n            body.message.startsWith(\"Billing limit exceeded\"))\n        ) {\n          throw new ChromaQuotaExceededError(body?.message);\n        }\n        throw new ChromaClientError(body?.message || \"Unprocessable Entity\");\n      } catch (error) {\n        if (\n          error instanceof ChromaQuotaExceededError ||\n          error instanceof ChromaClientError\n        ) {\n          throw error;\n        }\n        throw new ChromaClientError(\n          `Unprocessable Entity: ${response.statusText}`,\n        );\n      }\n    case 429:\n      const rateLimitBody = await getErrorBody(response);\n      if (rateLimitBody.error === \"Backoff\") {\n        throw new ChromaBackoffError(\n          rateLimitBody.message || \"Backoff and retry\",","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/clients/new-js/packages/chromadb/src/chroma-fetch.ts#L99-L135","documentation":"Thrown by chromaFetch (chroma-fetch.ts:117) as a ChromaQuotaExceededError when the server returns 422 with a message beginning 'Quota exceeded' or 'Billing limit exceeded'. This is Chroma Cloud telling you a hard usage or spending limit has been reached and writes (or all operations) are rejected until the quota resets or the limit is raised.","triggerScenarios":"Any write/query against Chroma Cloud after the tenant hit its storage, request, or billing cap; end-of-month limits on free tiers; a burst of ingestion crossing a spending ceiling mid-run.","commonSituations":"Free-tier projects exhausting monthly units; production ingestion jobs hitting spend limits; quota changed by an admin without notifying the app team.","solutions":["Check the Chroma Cloud console for which quota/limit fired and when it resets.","Raise the billing/usage limit or upgrade the plan if the usage is legitimate.","Pause ingestion and resume after reset, making the job resumable/idempotent.","Catch ChromaQuotaExceededError to stop retry storms — retrying will not help until the quota clears."],"exampleFix":"// before\nfor (const batch of batches) await collection.add(batch); // dies mid-loop with QuotaExceededError\n\n// after\nfor (const batch of batches) {\n  try {\n    await collection.add(batch);\n  } catch (e) {\n    if (e instanceof ChromaQuotaExceededError) { await pauseUntilQuotaReset(); continue; }\n    throw e;\n  }\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await collection.add(batch);\n} catch (e) {\n  if (e instanceof ChromaQuotaExceededError) {\n    // stop retrying immediately; persist progress, alert ops, wait for reset or limit raise\n  }\n  throw e;\n}","preventionTips":["Track usage against plan limits and alert before hitting the ceiling.","Design ingestion jobs to be resumable so a quota stop is cheap.","Never blind-retry on quota errors — it cannot succeed until the quota resets."],"tags":["http-422","quota","billing","cloud","rate-limits"],"backgroundTag":"quota-exceeded","analyzedSha":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}