SigNoz/signoz · error
errors.CodeInvalidInput
errors.CodeInvalidInput
Error message
id is not a valid uuid
What it means
NewStorableDashboardFromDashboard converts a Dashboard into its storable form by parsing dashboard.ID with valuer.NewUUID. If the ID is not a parseable UUID (empty string, random string, malformed), the UUID parse fails and this invalid-input error is returned.
Source
Thrown at pkg/types/dashboardtypes/dashboard.go:78
UpdatableDashboard = StorableDashboardData
PostableDashboard = StorableDashboardData
ListableDashboard []*GettableDashboard
)
// readString reads a string field from the untyped data blob, yielding "" when
// the key is absent, null, or not a string.
func (d StorableDashboardData) readString(key string) string {
s, _ := d[key].(string)
return s
}
func NewStorableDashboardFromDashboard(dashboard *Dashboard) (*StorableDashboard, error) {
dashboardID, err := valuer.NewUUID(dashboard.ID)
if err != nil {
return nil, errors.Wrapf(err, errors.TypeInvalidInput, errors.CodeInvalidInput, "id is not a valid uuid")
}
if !dashboard.Source.IsValid() {
return nil, errors.Newf(errors.TypeInvalidInput, ErrCodeDashboardInvalidSource, "invalid dashboard source %q, must be one of user, system, integration", dashboard.Source.StringValue())
}
return &StorableDashboard{
Identifiable: types.Identifiable{
ID: dashboardID,
},
TimeAuditable: types.TimeAuditable{
CreatedAt: dashboard.CreatedAt,
UpdatedAt: dashboard.UpdatedAt,
},
UserAuditable: types.UserAuditable{
CreatedBy: dashboard.CreatedBy,
UpdatedBy: dashboard.UpdatedBy,
},View on GitHub (pinned to 5069bf80b0)
Solutions
- Omit/empty the ID for Create so a UUID is generated server-side, and pass the returned UUID on Update
- Generate a proper UUID (github.com/google/uuid.New()) client-side if you must supply an ID
- Validate the ID format before calling the API
Example fix
// before dashboard.ID = "my-cool-dashboard" // after import "github.com/google/uuid" dashboard.ID = uuid.New().String()
Defensive patterns
Strategy: validation
Validate before calling
import (
"github.com/google/uuid"
)
func validDashboardID(id string) bool {
if id == "" { return true } // server assigns on create
_, err := uuid.Parse(id)
return err == nil
} Type guard
func isUUID(s string) bool {
if s == "" { return false }
_, err := uuid.Parse(s)
return err == nil
} Try / catch
sd, err := NewStorableDashboardFromDashboard(d)
if err != nil && strings.Contains(err.Error(), "id is not a valid uuid") {
d.ID = uuid.New().String()
sd, err = NewStorableDashboardFromDashboard(d)
} Prevention
- Leave ID empty on create; use the server-returned UUID thereafter
- Clear IDs on clone/duplicate flows
When it happens
Trigger: Calling Create/Update/LockUnlock with dashboard.ID set to a non-UUID string such as "my-dashboard" or an empty string where a UUID is required.
Common situations: Clients generating their own slug-style IDs instead of server-assigned UUIDs; frontend forms not clearing an ID field on clone/duplicate flows; test fixtures with placeholder IDs like "test-1".
Related errors
- ErrCodePublicDashboardInvalidInput
- invalid_input
- dashboard_invalid_patch
- public_dashboard_invalid_input
- invalid org id: %w
AI-assisted analysis of SigNoz/signoz@5069bf80b0 (2026-08-28).
Data as JSON: /api/errors/f14b3220e1e753ea.
Report an issue: GitHub.