SigNoz/signoz · error · basemodel.ApiError

ingestion key creation response not as expected

Error message

ingestion key creation response not as expected

What it means

Key creation reported success but the returned data.value is empty. This fail-early guard prevents returning connection params with a useless empty ingestion key.

Source

Thrown at ee/query-service/app/api/cloudIntegrations.go:280

		},
	)
	if apiErr != nil {
		return "", basemodel.WrapApiError(
			apiErr, "couldn't create cloudprovider ingestion key",
		)
	}

	if createKeyResult.Status != "success" {
		return "", basemodel.InternalError(fmt.Errorf(
			"couldn't create cloudprovider ingestion key: status: %s, error: %s",
			createKeyResult.Status, createKeyResult.Error,
		))
	}

	ingestionKey := createKeyResult.Data.Value
	if len(ingestionKey) < 1 {
		// Fail early if actual response structure and expectation here ever diverge
		return "", basemodel.InternalError(fmt.Errorf(
			"ingestion key creation response not as expected",
		))
	}

	return ingestionKey, nil
}

func requestGateway[ResponseType any](
	ctx context.Context, gatewayUrl string, licenseKey string, path string, payload any,
) (*ResponseType, *basemodel.ApiError) {

	baseUrl := strings.TrimSuffix(gatewayUrl, "/")
	reqUrl := fmt.Sprintf("%s%s", baseUrl, path)

	headers := map[string]string{
		"X-Signoz-Cloud-Api-Key": licenseKey,
		"X-Consumer-Username":    "lid:00000000-0000-0000-0000-000000000000",
		"X-Consumer-Groups":      "ns:default",

View on GitHub (pinned to 5069bf80b0)

Solutions

  1. Log the full creation response to locate the actual key field
  2. Retry the flow; the subsequent search path may then find the key with its value
  3. Report the response-shape change if the value genuinely moved
Defensive patterns

Strategy: retry

Try / catch

Retry the full get-or-create flow once; if the value stays empty, alert on schema drift.

Prevention

When it happens

Trigger: createKeyResult.Status == "success" yet createKeyResult.Data.Value is empty — response shape drift or a gateway bug returning success without a key.

Common situations: Upstream API change moving the value field, or an eventual-consistency window where the created key is not yet readable.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


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