SigNoz/signoz · error · basemodel.ApiError
couldn't unmarshal deployment info response: error: %w
Error message
couldn't unmarshal deployment info response: error: %w
What it means
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.
Source
Thrown at ee/query-service/app/api/cloudIntegrations.go:176
ClusterInfo struct {
Region struct {
DNS string `json:"dns"`
} `json:"region"`
} `json:"cluster"`
}
respBytes, err := ah.Signoz.Zeus.GetDeployment(ctx, licenseKey)
if err != nil {
return "", basemodel.InternalError(fmt.Errorf(
"couldn't query for deployment info: error: %w", err,
))
}
resp := new(deploymentResponse)
err = json.Unmarshal(respBytes, resp)
if err != nil {
return "", basemodel.InternalError(fmt.Errorf(
"couldn't unmarshal deployment info response: error: %w", err,
))
}
regionDns := resp.ClusterInfo.Region.DNS
deploymentName := resp.Name
if len(regionDns) < 1 || len(deploymentName) < 1 {
// Fail early if actual response structure and expectation here ever diverge
return "", basemodel.InternalError(fmt.Errorf(
"deployment info response not in expected shape. couldn't determine region dns and deployment name",
))
}
signozApiUrl := fmt.Sprintf("https://%s.%s", deploymentName, regionDns)
return signozApiUrl, nil
}View on GitHub (pinned to 5069bf80b0)
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
Defensive patterns
Strategy: fallback
Try / catch
Catch json unmarshal errors, log the raw body for diagnosis, and fall back to retrying since a malformed body is often transient (proxy pages).
Prevention
- Log raw upstream bodies when parsing fails
- Bypass HTML-error-page-injecting proxies for cloud endpoints
When it happens
Trigger: Zeus returns a non-JSON body (HTML error page, empty body, truncated response) while getIngestionUrlAndSigNozAPIUrl parses it with json.Unmarshal.
Common situations: 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.
Related errors
- couldn't unmarshal gateway response into %T
- couldn't query for deployment info: error: %w
- deployment info response not in expected shape. couldn't det
- couldn't search for cloudprovider ingestion key: status: %s,
- couldn't create cloudprovider ingestion key: status: %s, err
AI-assisted analysis of SigNoz/signoz@5069bf80b0 (2026-08-28).
Data as JSON: /api/errors/f39bcad49037fd20.
Report an issue: GitHub.