Skip to content

Commit

Permalink
fix: ensure persister errors are handled by sqlcon (#473)
Browse files Browse the repository at this point in the history
  • Loading branch information
zepatrik authored Mar 9, 2021
1 parent a85f4d7 commit 4343c4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/persistence/sql/relationtuples.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (p *Persister) DeleteRelationTuples(ctx context.Context, rs ...*relationtup
r.Relation,
r.Subject.String(),
).Exec(); err != nil {
return errors.WithStack(err)
return sqlcon.HandleError(err)
}
}

Expand Down Expand Up @@ -156,7 +156,7 @@ func (p *Persister) GetRelationTuples(ctx context.Context, query *relationtuple.

var res relationTuples
if err := sqlQuery.All(&res); err != nil {
return nil, x.PageTokenEnd, errors.WithStack(err)
return nil, x.PageTokenEnd, sqlcon.HandleError(err)
}

nextPageToken := pagination.encodeNextPageToken()
Expand Down

0 comments on commit 4343c4a

Please sign in to comment.