{"record":{"id":"79486dbbb303d411","repo":"SigNoz/signoz","slug":"invalid-input-79486d","errorCode":"invalid_input","errorMessage":"failed to parse view id","messagePattern":"failed to parse view id","errorType":"error_code","errorClass":"errors.base","httpStatus":400,"severity":"error","filePath":"pkg/modules/savedview/implsavedview/handler_v2.go","lineNumber":60,"sourceCode":"\t}\n\n\trender.Success(w, http.StatusCreated, types.Identifiable{ID: uuid})\n}\n\nfunc (handler *handler) GetV2(w http.ResponseWriter, r *http.Request) {\n\tctx, cancel := context.WithTimeout(r.Context(), 10*time.Second)\n\tdefer cancel()\n\n\tclaims, err := authtypes.ClaimsFromContext(ctx)\n\tif err != nil {\n\t\trender.Error(w, err)\n\t\treturn\n\t}\n\n\tviewID := mux.Vars(r)[\"id\"]\n\tviewUUID, err := valuer.NewUUID(viewID)\n\tif err != nil {\n\t\trender.Error(w, errors.Wrapf(err, errors.TypeInvalidInput, errors.CodeInvalidInput, \"failed to parse view id\"))\n\t\treturn\n\t}\n\n\tview, err := handler.module.GetView(ctx, claims.OrgID, viewUUID)\n\tif err != nil {\n\t\trender.Error(w, err)\n\t\treturn\n\t}\n\n\trender.Success(w, http.StatusOK, view)\n}\n\nfunc (handler *handler) UpdateV2(w http.ResponseWriter, r *http.Request) {\n\tctx, cancel := context.WithTimeout(r.Context(), 10*time.Second)\n\tdefer cancel()\n\n\tclaims, err := authtypes.ClaimsFromContext(ctx)\n\tif err != nil {","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/SigNoz/signoz/blob/5069bf80b08f1f00d7e014eccc09902f9871004f/pkg/modules/savedview/implsavedview/handler_v2.go#L42-L78","documentation":"GetV2 handler failed to parse {id} as a UUID with valuer.NewUUID, identical class to the v1 Get guard.","triggerScenarios":"GET /api/v2/views/{id} with a malformed or non-UUID id.","commonSituations":"Migrating clients to v2 while still passing slugs or numeric ids; id mangled by routing/rewrite rules.","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"],"exampleFix":"// before\nGET /api/v2/views/all-errors\n// after\nGET /api/v2/views/123e4567-e89b-12d3-a456-426614174000","handlingStrategy":"validation","validationCode":"assertUUID(viewId);\nawait api.getViewV2(viewId);","typeGuard":"function isUUID(s: string): s is `${string}-${string}-${string}-${string}-${string}` { return /^[0-9a-f-]{36}$/i.test(s); }","tryCatchPattern":null,"preventionTips":["Treat v2 ids as opaque UUIDs from v2 responses","Add client-side route param validation"],"tags":["uuid","path-parameter","invalid-input","savedview","v2-api"],"backgroundTag":"invalid-uuid-path-parameter","analyzedSha":"5069bf80b08f1f00d7e014eccc09902f9871004f","analyzedAt":"2026-08-28T06:22:12.824Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}