SigNoz/signoz · error · errors.base
invalid_input
invalid_input
Error message
failed to parse view id
What it means
GetV2 handler failed to parse {id} as a UUID with valuer.NewUUID, identical class to the v1 Get guard.
Source
Thrown at pkg/modules/savedview/implsavedview/handler_v2.go:60
}
render.Success(w, http.StatusCreated, types.Identifiable{ID: uuid})
}
func (handler *handler) GetV2(w http.ResponseWriter, r *http.Request) {
ctx, cancel := context.WithTimeout(r.Context(), 10*time.Second)
defer cancel()
claims, err := authtypes.ClaimsFromContext(ctx)
if err != nil {
render.Error(w, err)
return
}
viewID := mux.Vars(r)["id"]
viewUUID, err := valuer.NewUUID(viewID)
if err != nil {
render.Error(w, errors.Wrapf(err, errors.TypeInvalidInput, errors.CodeInvalidInput, "failed to parse view id"))
return
}
view, err := handler.module.GetView(ctx, claims.OrgID, viewUUID)
if err != nil {
render.Error(w, err)
return
}
render.Success(w, http.StatusOK, view)
}
func (handler *handler) UpdateV2(w http.ResponseWriter, r *http.Request) {
ctx, cancel := context.WithTimeout(r.Context(), 10*time.Second)
defer cancel()
claims, err := authtypes.ClaimsFromContext(ctx)
if err != nil {View on GitHub (pinned to 5069bf80b0)
Solutions
- Use the UUID exactly as returned by the v2 create/list responses
- Client-side validate with a UUID parser
- Check gateway rewrites aren't altering the path segment
Example fix
// before GET /api/v2/views/all-errors // after GET /api/v2/views/123e4567-e89b-12d3-a456-426614174000
Defensive patterns
Strategy: validation
Validate before calling
assertUUID(viewId); await api.getViewV2(viewId);
Type guard
function isUUID(s: string): s is `${string}-${string}-${string}-${string}-${string}` { return /^[0-9a-f-]{36}$/i.test(s); } Prevention
- Treat v2 ids as opaque UUIDs from v2 responses
- Add client-side route param validation
When it happens
Trigger: GET /api/v2/views/{id} with a malformed or non-UUID id.
Common situations: Migrating clients to v2 while still passing slugs or numeric ids; id mangled by routing/rewrite rules.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- ErrCodePricingRuleInvalidInput
- span_attribute_mapping_invalid_input
- invalid_input
- CodeInvalidInput
- CodeInvalidInput
AI-assisted analysis of SigNoz/signoz@5069bf80b0 (2026-08-28).
Data as JSON: /api/errors/79486dbbb303d411.
Report an issue: GitHub.