Skip to content

Commit

Permalink
fix: tiny stuff (#1211)
Browse files Browse the repository at this point in the history
* fix: tracing in persistence.sql.TraverseSubjectSetRewrite

* fix: incorrect HTTP return code
  • Loading branch information
alnr authored Jan 30, 2023
1 parent 05ec2da commit 719a7d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions internal/persistence/sql/traverser.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ LIMIT ?
}

func (t *Traverser) TraverseSubjectSetRewrite(ctx context.Context, start *relationtuple.RelationTuple, computedSubjectSets []string) (res []*relationtuple.TraversalResult, err error) {
ctx, span := t.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.TraverseSubjectSetRewrite")
defer otelx.End(span, &err)

namespaceManager, err := t.d.Config(ctx).NamespaceManager()
if err != nil {
Expand All @@ -145,9 +147,6 @@ func (t *Traverser) TraverseSubjectSetRewrite(ctx context.Context, start *relati
}

if len(relations) > 0 {
_, span := t.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.TraverseSubjectSetRewrite")
defer otelx.End(span, &err)

var rows relationTuples

query := t.p.queryWithNetwork(ctx)
Expand Down
2 changes: 1 addition & 1 deletion internal/swagger_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

package internal

// Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201.
// Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 204.
//
// swagger:response emptyResponse
// nolint:deadcode,unused
Expand Down

0 comments on commit 719a7d5

Please sign in to comment.