{"record":{"id":"0705cf8214661da1","repo":"conductor-oss/conductor","slug":"azure-foundry-api-call-to-label-failed-http-re","errorCode":null,"errorMessage":"Azure Foundry API call to {label} failed: HTTP {response.code()} — {responseBody}","messagePattern":"Azure Foundry API call to (.+?) failed: HTTP (.+?) — (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/service/AzureFoundryAgentClient.java","lineNumber":407,"sourceCode":"        return execute(request, url);\n    }\n\n    private JsonNode get(String url, String bearerToken, String apiVersion) {\n        String fullUrl = url.contains(\"?\") ? url : url + \"?api-version=\" + apiVersion;\n        Request request =\n                new Request.Builder()\n                        .url(fullUrl)\n                        .get()\n                        .header(\"Authorization\", \"Bearer \" + bearerToken)\n                        .build();\n        return execute(request, url);\n    }\n\n    private JsonNode execute(Request request, String label) {\n        try (Response response = httpClient.newCall(request).execute()) {\n            String responseBody = response.body() != null ? response.body().string() : \"{}\";\n            if (!response.isSuccessful()) {\n                throw new RuntimeException(\n                        \"Azure Foundry API call to \"\n                                + label\n                                + \" failed: HTTP \"\n                                + response.code()\n                                + \" — \"\n                                + responseBody);\n            }\n            return MAPPER.readTree(responseBody);\n        } catch (IOException e) {\n            throw new RuntimeException(\"Azure Foundry API call to \" + label + \" failed\", e);\n        }\n    }\n\n    private String resolveApiVersion(ConductorAgentStartRequest request) {\n        String v = rawConfig(request, \"apiVersion\");\n        return StringUtils.isBlank(v) ? DEFAULT_API_VERSION : v;\n    }\n","sourceCodeStart":389,"sourceCodeEnd":425,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/service/AzureFoundryAgentClient.java#L389-L425","documentation":"Error \"Azure Foundry API call to {label} failed: HTTP {response.code()} — {responseBody}\" thrown in conductor-oss/conductor.","triggerScenarios":"Thrown at agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/service/AzureFoundryAgentClient.java:407 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the HTTP status code and response body in the error for the Azure Foundry failure reason.","For 401/403, verify the credentialRef token is valid; for 404, check endpoint and assistantId; for 429, back off and retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}