Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Add custom prefix devurl #74

Merged
merged 7 commits into from
Aug 4, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Enabled error response JSON body output
  • Loading branch information
Russtopia committed Jul 30, 2020
commit 362ddc7cab9256c9574b61d82fe8b7c165dcf90a
3 changes: 3 additions & 0 deletions internal/entclient/devurl.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func (c Client) DelDevURL(envID, urlID string) error {
if err != nil {
return err
}
defer res.Body.Close()

if res.StatusCode != http.StatusOK {
return bodyError(res)
Expand Down Expand Up @@ -51,6 +52,7 @@ func (c Client) InsertDevURL(envID string, port int, name, access string) error
if err != nil {
return err
}
defer res.Body.Close()

if res.StatusCode != http.StatusOK {
return bodyError(res)
Expand Down Expand Up @@ -80,6 +82,7 @@ func (c Client) UpdateDevURL(envID, urlID string, port int, name, access string)
if err != nil {
return err
}
defer res.Body.Close()

if res.StatusCode != http.StatusOK {
return bodyError(res)
Expand Down
2 changes: 1 addition & 1 deletion internal/entclient/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func bodyError(resp *http.Response) error {
byt, err := httputil.DumpResponse(resp, false)
byt, err := httputil.DumpResponse(resp, true)
if err != nil {
return xerrors.Errorf("dump response: %w", err)
}
Expand Down