SigNoz/signoz · error · errors SigNozError
ErrCodeInvalidInput
ErrCodeInvalidInput
Error message
request must use either old fields (account_id, cloud_account_id) or new fields (cloudIntegrationId, providerAccountId), not both
What it means
PostableAgentCheckIn.UnmarshalJSON rejects payloads that mix legacy identification fields (account_id / cloud_account_id mapped to temp.ID/AccountID) with the new fields (cloudIntegrationId, providerAccountId). Exactly one field set must be used.
Source
Thrown at pkg/types/cloudintegrationtypes/checkin.go:98
IntegrationConfig: integrationConfig,
RemovedAt: removedAt,
}
}
func (postable *PostableAgentCheckIn) UnmarshalJSON(data []byte) error {
type Alias PostableAgentCheckIn
var temp Alias
err := json.Unmarshal(data, &temp)
if err != nil {
return err
}
hasOldFields := temp.ID != "" || temp.AccountID != ""
hasNewFields := !temp.CloudIntegrationID.IsZero() || temp.ProviderAccountID != ""
if hasOldFields && hasNewFields {
return errors.New(errors.TypeInvalidInput, ErrCodeInvalidInput,
"request must use either old fields (account_id, cloud_account_id) or new fields (cloudIntegrationId, providerAccountId), not both")
}
if !hasOldFields && !hasNewFields {
return errors.New(errors.TypeInvalidInput, ErrCodeInvalidInput,
"request must provide either old fields (account_id, cloud_account_id) or new fields (cloudIntegrationId, providerAccountId)")
}
*postable = PostableAgentCheckIn(temp)
return nil
}
View on GitHub (pinned to 5069bf80b0)
Solutions
- Remove the legacy account_id/cloud_account_id keys from the check-in payload/config
- Or remove cloudIntegrationId/providerAccountId if you must stay on the legacy scheme
- Upgrade/downgrade agents uniformly so all report the same field set
- Add a config lint that fails when both field sets are present
Example fix
// before
{"account_id":"12345","cloudIntegrationId":"01H...","providerAccountId":"aws-1"}
// after
{"cloudIntegrationId":"01H...","providerAccountId":"aws-1"}
Defensive patterns
Strategy: validation
Validate before calling
const hasOld = !!(body.account_id || body.cloud_account_id);
const hasNew = !!(body.cloudIntegrationId || body.providerAccountId);
if (hasOld && hasNew) throw new Error('pick one field set'); Prevention
- Pin agent version to one config schema
- Add config lint rejecting mixed field sets
When it happens
Trigger: An agent check-in request body containing both account_id and cloudIntegrationId (or providerAccountId) — typically after an agent was upgraded mid-configuration or a config file has leftover legacy keys.
Common situations: Agent version mismatch where new config format appends cloudIntegrationId while the old account_id remains; manual config edits; migration scripts that add new keys without removing old ones.
Related errors
AI-assisted analysis of SigNoz/signoz@5069bf80b0 (2026-08-28).
Data as JSON: /api/errors/f3711ade9c5d5cb5.
Report an issue: GitHub.