{"record":{"id":"a27e6b6e084dbcf2","repo":"SigNoz/signoz","slug":"invalid-panel-type-s","errorCode":null,"errorMessage":"invalid panel type: %s","messagePattern":"invalid panel type: (.+?)","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"pkg/query-service/model/v3/v3.go","lineNumber":218,"sourceCode":"\t}\n}\n\ntype PanelType string\n\nconst (\n\tPanelTypeValue PanelType = \"value\"\n\tPanelTypeGraph PanelType = \"graph\"\n\tPanelTypeTable PanelType = \"table\"\n\tPanelTypeList  PanelType = \"list\"\n\tPanelTypeTrace PanelType = \"trace\"\n)\n\nfunc (p PanelType) Validate() error {\n\tswitch p {\n\tcase PanelTypeValue, PanelTypeGraph, PanelTypeTable, PanelTypeList, PanelTypeTrace:\n\t\treturn nil\n\tdefault:\n\t\treturn fmt.Errorf(\"invalid panel type: %s\", p)\n\t}\n}\n\n// AggregateAttributeRequest is a request to fetch possible attribute keys\n// for a selected aggregate operator and search text.\n// The context of the selected aggregate operator is used as the\n// type of the attribute key is different for different aggregate operators.\n// For example, for the aggregate operator \"avg\" the attribute value type must be\n// a number\ntype AggregateAttributeRequest struct {\n\tDataSource DataSource        `json:\"dataSource\"`\n\tOperator   AggregateOperator `json:\"aggregateOperator\"`\n\tSearchText string            `json:\"searchText\"`\n\tLimit      int               `json:\"limit\"`\n}\n\ntype TagType string\n","sourceCodeStart":200,"sourceCodeEnd":236,"githubUrl":"https://github.com/SigNoz/signoz/blob/5069bf80b08f1f00d7e014eccc09902f9871004f/pkg/query-service/model/v3/v3.go#L200-L236","documentation":"PanelType.Validate() rejects a panel type outside the supported set: \"value\" (PanelTypeValue), \"graph\" (PanelTypeGraph), \"table\" (PanelTypeTable), \"list\" (PanelTypeList), \"trace\" (PanelTypeTrace). Panel type shapes how builder queries are validated and rendered.","triggerScenarios":"Sending a v3 query request with compositeQuery.panelType set to \"timeseries\", \"scatter\", \"traces\", \"\" etc. PanelType flows into BuilderQuery.Validate(panelType), so an invalid value fails request validation.","commonSituations":"Frontends built against a different dashboarding vocabulary (Grafana panel names), missing panelType field in scripted API calls, version skew after panel types were added or renamed.","solutions":["Use one of the exact strings: \"value\", \"graph\", \"table\", \"list\", \"trace\"","Map Grafana-style names: timeseries→graph, stat→value, table stays table, traces→trace","Set panelType on every composite query request; do not rely on defaults"],"exampleFix":"// before\ncq.PanelType = v3.PanelType(\"timeseries\")\n\n// after\ncq.PanelType = v3.PanelTypeGraph","handlingStrategy":"validation","validationCode":"switch cq.PanelType { case v3.PanelTypeValue, v3.PanelTypeGraph, v3.PanelTypeTable, v3.PanelTypeList, v3.PanelTypeTrace: default: return fmt.Errorf(\"bad panelType %q\", cq.PanelType) }","typeGuard":"func isValidPanelType(p v3.PanelType) bool { switch p { case v3.PanelTypeValue, v3.PanelTypeGraph, v3.PanelTypeTable, v3.PanelTypeList, v3.PanelTypeTrace: return true }; return false }","tryCatchPattern":null,"preventionTips":["Always set panelType explicitly on composite queries","Translate generic panel names (timeseries→graph) at the client boundary"],"tags":["go","validation","enum","panel","signoz"],"backgroundTag":"invalid-enum-value","analyzedSha":"5069bf80b08f1f00d7e014eccc09902f9871004f","analyzedAt":"2026-08-28T06:22:12.824Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}