SigNoz/signoz · warning
invalid_input
invalid_input
Error message
keyId is required
What it means
Returned by DeleteIngestionKey when the keyId path variable is empty in the delete request. The handler cannot identify which ingestion key to delete, so it rejects with invalid_input before calling the gateway.
Source
Thrown at pkg/gateway/handler.go:173
}
render.Success(rw, http.StatusNoContent, nil)
}
func (handler *handler) DeleteIngestionKey(rw http.ResponseWriter, r *http.Request) {
ctx := r.Context()
claims, err := authtypes.ClaimsFromContext(ctx)
if err != nil {
render.Error(rw, err)
return
}
orgID := valuer.MustNewUUID(claims.OrgID)
keyID := mux.Vars(r)["keyId"]
if keyID == "" {
render.Error(rw, errors.New(errors.TypeInvalidInput, errors.CodeInvalidInput, "keyId is required"))
return
}
err = handler.gateway.DeleteIngestionKey(ctx, orgID, keyID)
if err != nil {
render.Error(rw, err)
return
}
render.Success(rw, http.StatusNoContent, nil)
}
func (handler *handler) CreateIngestionKeyLimit(rw http.ResponseWriter, r *http.Request) {
ctx := r.Context()
claims, err := authtypes.ClaimsFromContext(ctx)
if err != nil {
render.Error(rw, err)View on GitHub (pinned to 5069bf80b0)
Solutions
- Send DELETE /api/v1/ingestion-keys/{keyId} with a real id
- Register the delete route with the {keyId} parameter
- Disable/hide the delete action client-side until a key is selected
Example fix
// before DELETE /api/v1/ingestion-keys/ // after DELETE /api/v1/ingestion-keys/7f9c24e0-...
Defensive patterns
Strategy: validation
Validate before calling
keyID := mux.Vars(r)["keyId"]
if _, err := valuer.NewUUID(keyID); err != nil {
http.Error(rw, "valid keyId required", http.StatusBadRequest)
return
} Prevention
- Guard the delete action on a non-empty selected key id
- Register DELETE route with the {keyId} segment and test the 400 path
When it happens
Trigger: DELETE on a route where mux.Vars(r)["keyId"] resolves to "" — trailing-slash URL, misregistered route without {keyId}, or client sending DELETE to the collection endpoint.
Common situations: Delete button wired with a null key id producing /ingestion-keys/; router registered as /ingestion-keys for DELETE; proxy normalizing away the path segment.
Related errors
- ErrCodeRoleInvalidInput
- CodeInvalidInput
- CodeInvalidInput
- ErrCodeInvalidGatewayConfig
- invalid_request_query
AI-assisted analysis of SigNoz/signoz@5069bf80b0 (2026-08-28).
Data as JSON: /api/errors/a3845b6181fe0bd2.
Report an issue: GitHub.