{"record":{"id":"743a7d20aa606835","repo":"windmill-labs/windmill","slug":"http-error-response-status","errorCode":null,"errorMessage":"HTTP error: ${response.status}","messagePattern":"HTTP error: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"frontend/src/lib/components/BedrockCredentialsCheck.svelte","lineNumber":33,"sourceCode":"\n\ttype CheckStatus = 'idle' | 'loading' | 'success' | 'error'\n\n\tlet apiStatus: CheckStatus = $state('idle')\n\tlet apiResult: CredentialsCheckResult | null = $state(null)\n\n\tlet workerStatus: CheckStatus = $state('idle')\n\tlet workerResult: (CredentialsCheckResult & { worker?: string }) | null = $state(null)\n\n\tlet isChecking = $state(false)\n\n\tasync function checkApiCredentials() {\n\t\tapiStatus = 'loading'\n\t\tapiResult = null\n\n\t\ttry {\n\t\t\tconst response = await fetch(`/api/w/${$workspaceStore}/ai/check_bedrock_credentials`)\n\t\t\tif (!response.ok) {\n\t\t\t\tthrow new Error(`HTTP error: ${response.status}`)\n\t\t\t}\n\t\t\tapiResult = await response.json()\n\t\t\tapiStatus = apiResult?.available ? 'success' : 'error'\n\t\t} catch (err) {\n\t\t\tapiResult = {\n\t\t\t\tavailable: false,\n\t\t\t\terror: err instanceof Error ? err.message : 'Unknown error'\n\t\t\t}\n\t\t\tapiStatus = 'error'\n\t\t}\n\t}\n\n\tasync function checkWorkerCredentials() {\n\t\tworkerStatus = 'loading'\n\t\tworkerResult = null\n\n\t\ttry {\n\t\t\t// Create minimal flow with AI agent dry_run step","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/frontend/src/lib/components/BedrockCredentialsCheck.svelte#L15-L51","documentation":"In frontend/src/lib/components/BedrockCredentialsCheck.svelte:33, checkApiCredentials fetches /api/w/<workspace>/ai/check_bedrock_credentials and throws \"HTTP error: <status>\" when the response is not ok. It signals the backend rejected the credentials check request rather than returning a JSON verdict.","triggerScenarios":"GET check_bedrock_credentials returns 4xx/5xx — e.g. workspace has no AWS/Bedrock configuration, the user lacks permission, or the endpoint is unavailable in this deployment/edition.","commonSituations":"Self-hosted instance without the Bedrock integration; expired workspace token (401/403); misconfigured AWS credentials on the server (500).","solutions":["Verify the workspace has Bedrock/AWS credentials configured (instance or workspace settings)","Check network tab for the exact status and backend logs for the underlying cause","Confirm the deployment includes the AI/Bedrock endpoints","Re-login if the status is 401/403"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"null","typeGuard":"null","tryCatchPattern":"try {\n  const res = await fetch(url);\n  if (!res.ok) throw new Error(`HTTP error: ${res.status}`);\n  apiResult = await res.json();\n} catch (err) {\n  apiResult = { available: false };\n  apiStatus = 'error';\n  console.error('Bedrock credentials check failed:', err);\n}","preventionTips":["Configure Bedrock/AWS credentials before using AI features in the workspace","Handle 401/403 by prompting re-login","Feature-detect endpoint availability instead of assuming it exists","Surface res.status to the user, not just a generic message"],"tags":["http","network","aws","credentials"],"backgroundTag":"http-error-response","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}