Skip to content

Commit

Permalink
correctly return message error if exists (#224)
Browse files Browse the repository at this point in the history
previously we were checking if the message had an error (which happens when the message fails to be decoded as json) and then we were promptly returning the nil error previously returned from the method request.

Now we capture the error returned by the `resp.Error()` method and return the error if one exists.

Signed-off-by: Mike Mason <[email protected]>
  • Loading branch information
mikemrm authored Mar 15, 2024
1 parent ca651fc commit b57c0b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/permissions/relationships.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (p *Permissions) submitAuthRelationshipRequest(ctx context.Context, topic s
}

if resp != nil {
if resp.Error() != nil {
if err := resp.Error(); err != nil {
errs = append(errs, err)
}

Expand Down

0 comments on commit b57c0b4

Please sign in to comment.