Skip to content

Commit b55a7a8

Browse files
Emyrkaslilac
andauthored
chore: delete user codersdk to support status code regression (coder#14173)
* chore: delete user codersdk to support status code regression * Update codersdk/users.go Co-authored-by: Kayla Washburn-Love <mckayla@hey.com> --------- Co-authored-by: Kayla Washburn-Love <mckayla@hey.com>
1 parent 8c05651 commit b55a7a8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

codersdk/users.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,9 @@ func (c *Client) DeleteUser(ctx context.Context, id uuid.UUID) error {
309309
return err
310310
}
311311
defer res.Body.Close()
312-
if res.StatusCode != http.StatusOK {
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.
314+
if res.StatusCode != http.StatusOK && res.StatusCode != http.StatusNoContent {
313315
return ReadBodyAsError(res)
314316
}
315317
return nil

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy