Skip to content

Commit

Permalink
Fix error when not authenticated
Browse files Browse the repository at this point in the history
  • Loading branch information
InfiniteStash committed Jan 2, 2025
1 parent bda805e commit a2361d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func authenticateHandler() func(http.Handler) http.Handler {
ctx = context.WithValue(ctx, user.ContextRoles, roles)

span := trace.SpanFromContext(ctx)
if span.SpanContext().IsValid() {
if span.SpanContext().IsValid() && u != nil {
span.SetAttributes(attribute.String("user.id", u.ID.String()))
}

Expand Down

0 comments on commit a2361d5

Please sign in to comment.