Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb55a7a8

Browse files
Emyrkaslilac
andauthored
chore: delete user codersdk to support status code regression (#14173)
* chore: delete user codersdk to support status code regression* Update codersdk/users.goCo-authored-by: Kayla Washburn-Love <mckayla@hey.com>---------Co-authored-by: Kayla Washburn-Love <mckayla@hey.com>
1 parent8c05651 commitb55a7a8

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
returnerr
310310
}
311311
deferres.Body.Close()
312-
ifres.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+
ifres.StatusCode!=http.StatusOK&&res.StatusCode!=http.StatusNoContent {
313315
returnReadBodyAsError(res)
314316
}
315317
returnnil

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp