Skip to content

Commit 5926e7b

Browse files
Emyrkaslilac
andauthored
Update codersdk/users.go
Co-authored-by: Kayla Washburn-Love <mckayla@hey.com>
1 parent 592d444 commit 5926e7b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

codersdk/users.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,10 +309,8 @@ func (c *Client) DeleteUser(ctx context.Context, id uuid.UUID) error {
309309
return err
310310
}
311311
defer res.Body.Close()
312-
// Check for both status codes, there was a release that changed this response
313-
// to StatusNoContent. To be compatible with that, the second condition is
314-
// included.
315-
// The 'http.StatusNoContent' check can be removed in 2025
312+
// Check for a 200 or a 204 response. 2.14.0 accidentally included a 204 response,
313+
// which was a breaking change, and reverted in 2.14.1.
316314
if res.StatusCode != http.StatusOK && res.StatusCode != http.StatusNoContent {
317315
return ReadBodyAsError(res)
318316
}

0 commit comments

Comments
 (0)