SigNoz/signoz · warning · errors.Error

ErrCodeUserDeprecated

ErrCodeUserDeprecated

Error message

the v1 user API is deprecated; instead, get your user with GET /api/v2/users/me

What it means

The v1 'get my user' endpoint is intentionally deprecated and always returns this error pointing callers to GET /api/v2/users/me. It is an unconditional TypeUnsupported response, not a conditional failure.

Source

Thrown at pkg/modules/user/impluser/handler.go:97

		return
	}

	userRoles, err := handler.getter.GetRolesByUserID(ctx, user.ID)
	if err != nil {
		render.Error(w, err)
		return
	}

	userWithRoles := &authtypes.UserWithRoles{
		User:      user,
		UserRoles: userRoles,
	}

	render.Success(w, http.StatusOK, userWithRoles)
}

func (handler *handler) GetMyUserDeprecated(w http.ResponseWriter, r *http.Request) {
	render.Error(w, errors.New(errors.TypeUnsupported, types.ErrCodeUserDeprecated,
		"the v1 user API is deprecated; instead, get your user with GET /api/v2/users/me"))
}

func (handler *handler) GetMyUser(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
	}

	user, err := handler.getter.GetUserByOrgIDAndID(ctx, valuer.MustNewUUID(claims.OrgID), valuer.MustNewUUID(claims.UserID))
	if err != nil {
		render.Error(w, err)
		return
	}

View on GitHub (pinned to 5069bf80b0)

Solutions

  1. Switch the client to GET /api/v2/users/me (GetMyUser handler)
  2. Upgrade the SigLens/last9 client SDK to a version using v2 endpoints
  3. Grep your codebase for '/api/v1/users/me' and replace all occurrences

Example fix

// before
resp, _ := http.Get(baseURL + "/api/v1/users/me")
// after
resp, _ := http.Get(baseURL + "/api/v2/users/me")
Defensive patterns

Strategy: fallback

Try / catch

resp, err := client.Get(baseURL + "/api/v1/users/me")
if err == nil && resp.StatusCode == http.StatusUnsupportedMediaType /* deprecated marker */ {
    resp, err = client.Get(baseURL + "/api/v2/users/me")
}

Prevention

When it happens

Trigger: Calling GET /api/v1/users/me (the deprecated handler) with any valid auth — it always returns this error.

Common situations: Old SDK/client versions still pinned to v1 endpoints; scripts or integrations written before the v2 migration; copy-pasted curl examples from old docs.

Related errors


AI-assisted analysis of SigNoz/signoz@5069bf80b0 (2026-08-28). Data as JSON: /api/errors/37e857273e701e78. Report an issue: GitHub.