{"record":{"id":"62e1882451a820b4","repo":"unslothai/unsloth","slug":"http-response-status-62e188","errorCode":null,"errorMessage":"HTTP (${response.status})","messagePattern":"HTTP \\((.+?)\\)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"studio/frontend/src/features/chat/api/openai-containers.ts","lineNumber":75,"sourceCode":"    ...(auth.apiKey\n      ? { encrypted_api_key: await encryptProviderApiKey(auth.apiKey) }\n      : {}),\n    provider_base_url: auth.baseUrl,\n  };\n}\n\nexport async function listOpenAIContainers(\n  auth: AuthInputs,\n): Promise<OpenAIContainerSummary[]> {\n  const response = await authFetch(\n    \"/api/inference/external/openai/containers/list\",\n    {\n      method: \"POST\",\n      headers: { \"content-type\": \"application/json\" },\n      body: JSON.stringify(await buildAuthBody(auth)),\n    },\n  );\n  if (!response.ok) throw new Error(await parseError(response));\n  const body = (await response.json()) as { containers?: RawSummary[] };\n  return (body.containers ?? []).map(fromRaw);\n}\n\nexport async function createOpenAIContainer(\n  auth: AuthInputs,\n  params: { name: string; ttlMinutes: number },\n): Promise<OpenAIContainerSummary> {\n  const response = await authFetch(\n    \"/api/inference/external/openai/containers/create\",\n    {\n      method: \"POST\",\n      headers: { \"content-type\": \"application/json\" },\n      body: JSON.stringify({\n        ...(await buildAuthBody(auth)),\n        name: params.name,\n        ttl_minutes: params.ttlMinutes,\n      }),","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/frontend/src/features/chat/api/openai-containers.ts#L57-L93","documentation":"Thrown when POST /api/inference/external/openai/containers/list fails. The message comes from parseError(response), which delegates to readFastApiError with fallback label 'HTTP' — producing 'HTTP (status)' when the error body has no readable detail. The request body carries provider_id, optional encrypted_api_key (encrypted via encryptProviderApiKey), and provider_base_url, so failures often originate in those inputs.","triggerScenarios":"Listing OpenAI containers with a providerId that doesn't exist server-side, a stale/changed provider public key making the encrypted key undecryptable, a wrong baseUrl, or the external containers API rejecting the credentials.","commonSituations":"Provider API key rotated since the cached public key was fetched; custom baseUrl pointing at a proxy without containers support; provider deleted while the containers dialog was open.","solutions":["Check the HTTP status embedded in the message: 401/403 → credentials; 404 → provider or endpoint missing; 5xx → upstream OpenAI issue.","Re-enter the provider API key so it is re-encrypted with a fresh public key (see importProviderPublicKey force-refresh).","Verify baseUrl — containers endpoints may not exist on proxied/self-hosted bases.","Confirm the provider still exists in provider settings."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (!auth.providerId) throw new Error('Select a provider first');\nif (auth.baseUrl && !auth.baseUrl.startsWith('http')) throw new Error('Invalid base URL');","typeGuard":null,"tryCatchPattern":"try { const items = await listOpenAIContainers(auth); }\ncatch (e) { if (/HTTP \\((401|403)\\)/.test(e.message)) promptReauth(); else showError(e.message); }","preventionTips":["Detect key-rotation errors with isProviderKeyRotationError and force-refresh the public key.","Hide containers UI for providers whose baseUrl is a proxy without containers support.","Cache container lists to avoid repeated external calls that can fail."],"tags":["openai","containers","encryption","external-api"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}