{"record":{"id":"f39bcad49037fd20","repo":"SigNoz/signoz","slug":"couldn-t-unmarshal-deployment-info-response-error","errorCode":null,"errorMessage":"couldn't unmarshal deployment info response: error: %w","messagePattern":"couldn't unmarshal deployment info response: error: %w","errorType":"http","errorClass":"basemodel.ApiError","httpStatus":500,"severity":"error","filePath":"ee/query-service/app/api/cloudIntegrations.go","lineNumber":176,"sourceCode":"\t\tClusterInfo struct {\n\t\t\tRegion struct {\n\t\t\t\tDNS string `json:\"dns\"`\n\t\t\t} `json:\"region\"`\n\t\t} `json:\"cluster\"`\n\t}\n\n\trespBytes, err := ah.Signoz.Zeus.GetDeployment(ctx, licenseKey)\n\tif err != nil {\n\t\treturn \"\", basemodel.InternalError(fmt.Errorf(\n\t\t\t\"couldn't query for deployment info: error: %w\", err,\n\t\t))\n\t}\n\n\tresp := new(deploymentResponse)\n\n\terr = json.Unmarshal(respBytes, resp)\n\tif err != nil {\n\t\treturn \"\", basemodel.InternalError(fmt.Errorf(\n\t\t\t\"couldn't unmarshal deployment info response: error: %w\", err,\n\t\t))\n\t}\n\n\tregionDns := resp.ClusterInfo.Region.DNS\n\tdeploymentName := resp.Name\n\n\tif len(regionDns) < 1 || len(deploymentName) < 1 {\n\t\t// Fail early if actual response structure and expectation here ever diverge\n\t\treturn \"\", basemodel.InternalError(fmt.Errorf(\n\t\t\t\"deployment info response not in expected shape. couldn't determine region dns and deployment name\",\n\t\t))\n\t}\n\n\tsignozApiUrl := fmt.Sprintf(\"https://%s.%s\", deploymentName, regionDns)\n\n\treturn signozApiUrl, nil\n}","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/SigNoz/signoz/blob/5069bf80b08f1f00d7e014eccc09902f9871004f/ee/query-service/app/api/cloudIntegrations.go#L158-L194","documentation":"The raw bytes returned by Zeus.GetDeployment could not be JSON-unmarshalled into the local deploymentResponse struct. This is a server-side parse failure on a response the service expected to be valid JSON, wrapped as an internal error.","triggerScenarios":"Zeus returns a non-JSON body (HTML error page, empty body, truncated response) while getIngestionUrlAndSigNozAPIUrl parses it with json.Unmarshal.","commonSituations":"A proxy or load balancer intercepting the cloud call and returning an HTML error page, a gateway API change altering the content type, or truncated responses from network issues.","solutions":["Log/inspect the raw respBytes to see what was actually returned","Check for intercepting proxies or captive portals on the egress path","Confirm the gateway API version matches what this query-service build expects","Retry in case of a truncated transient response"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"Catch json unmarshal errors, log the raw body for diagnosis, and fall back to retrying since a malformed body is often transient (proxy pages).","preventionTips":["Log raw upstream bodies when parsing fails","Bypass HTML-error-page-injecting proxies for cloud endpoints"],"tags":["json","cloud-integrations","upstream-api","parsing"],"backgroundTag":"json-unmarshal-failed","analyzedSha":"5069bf80b08f1f00d7e014eccc09902f9871004f","analyzedAt":"2026-08-28T06:22:12.824Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}