Skip to content

Commit

Permalink
Fix if statement; 200 is a success code (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasikpark authored Jun 11, 2024
1 parent 1568017 commit 391c978
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (c *Client) Enroll(ctx context.Context, logger logrus.FieldLogger, code str
// Log the request ID returned from the server
reqID := resp.Header.Get("X-Request-ID")
l := logger.WithFields(logrus.Fields{"statusCode": resp.StatusCode, "reqID": reqID})
if resp.StatusCode != http.StatusOK {
if resp.StatusCode == http.StatusOK {
l.Info("Enrollment request returned success code")
} else {
l.Error("Enrollment request returned error code")
Expand Down

0 comments on commit 391c978

Please sign in to comment.