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

  1. Log/inspect the raw respBytes to see what was actually returned
  2. Check for intercepting proxies or captive portals on the egress path
  3. Confirm the gateway API version matches what this query-service build expects
  4. 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

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


AI-assisted analysis of SigNoz/signoz@5069bf80b0 (2026-08-28). Data as JSON: /api/errors/f39bcad49037fd20. Report an issue: GitHub.