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
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Commit362ddc7

Browse files
author
Russtopia
committed
Enabled error response JSON body output
1 parent11f797a commit362ddc7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

‎internal/entclient/devurl.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ func (c Client) DelDevURL(envID, urlID string) error {
2222
iferr!=nil {
2323
returnerr
2424
}
25+
deferres.Body.Close()
2526

2627
ifres.StatusCode!=http.StatusOK {
2728
returnbodyError(res)
@@ -51,6 +52,7 @@ func (c Client) InsertDevURL(envID string, port int, name, access string) error
5152
iferr!=nil {
5253
returnerr
5354
}
55+
deferres.Body.Close()
5456

5557
ifres.StatusCode!=http.StatusOK {
5658
returnbodyError(res)
@@ -80,6 +82,7 @@ func (c Client) UpdateDevURL(envID, urlID string, port int, name, access string)
8082
iferr!=nil {
8183
returnerr
8284
}
85+
deferres.Body.Close()
8386

8487
ifres.StatusCode!=http.StatusOK {
8588
returnbodyError(res)

‎internal/entclient/error.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
)
99

1010
funcbodyError(resp*http.Response)error {
11-
byt,err:=httputil.DumpResponse(resp,false)
11+
byt,err:=httputil.DumpResponse(resp,true)
1212
iferr!=nil {
1313
returnxerrors.Errorf("dump response: %w",err)
1414
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp