From 8e65e252d085e41061682fd090a43a7c0cef2178 Mon Sep 17 00:00:00 2001 From: Caleb Jasik Date: Tue, 11 Jun 2024 13:53:41 -0500 Subject: [PATCH] Fix iff statement; 200 is a success code --- client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.go b/client.go index 775a8a3..da57f82 100644 --- a/client.go +++ b/client.go @@ -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")