We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 203f48a commit 592d444Copy full SHA for 592d444
codersdk/users.go
@@ -309,7 +309,11 @@ func (c *Client) DeleteUser(ctx context.Context, id uuid.UUID) error {
309
return err
310
}
311
defer res.Body.Close()
312
- if res.StatusCode != http.StatusOK {
+ // 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
316
+ if res.StatusCode != http.StatusOK && res.StatusCode != http.StatusNoContent {
317
return ReadBodyAsError(res)
318
319
return nil
0 commit comments