mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
chore: delete user codersdk to support status code regression (#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>
This commit is contained in:
@ -309,7 +309,9 @@ func (c *Client) DeleteUser(ctx context.Context, id uuid.UUID) error {
|
||||
return err
|
||||
}
|
||||
defer res.Body.Close()
|
||||
if res.StatusCode != http.StatusOK {
|
||||
// Check for a 200 or a 204 response. 2.14.0 accidentally included a 204 response,
|
||||
// which was a breaking change, and reverted in 2.14.1.
|
||||
if res.StatusCode != http.StatusOK && res.StatusCode != http.StatusNoContent {
|
||||
return ReadBodyAsError(res)
|
||||
}
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user