Skip to content

Commit 391c978

Browse files
authored
Fix if statement; 200 is a success code (#13)
1 parent 1568017 commit 391c978

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func (c *Client) Enroll(ctx context.Context, logger logrus.FieldLogger, code str
126126
// Log the request ID returned from the server
127127
reqID := resp.Header.Get("X-Request-ID")
128128
l := logger.WithFields(logrus.Fields{"statusCode": resp.StatusCode, "reqID": reqID})
129-
if resp.StatusCode != http.StatusOK {
129+
if resp.StatusCode == http.StatusOK {
130130
l.Info("Enrollment request returned success code")
131131
} else {
132132
l.Error("Enrollment request returned error code")

0 commit comments

Comments
 (0)