Skip to content

Commit 6668a48

Browse files
author
Naoki Kanazawa
committed
delete instanceで200が返ってきたらbodyはガン無視
1 parent e93a3c6 commit 6668a48

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

pkg/vmms/vmms.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,5 @@ func (c *client) DeleteInstance(name string) error {
124124
return xerrors.New(fmt.Sprintf("status code not 200: status code is %d: body: %s", resp.StatusCode, body))
125125
}
126126

127-
var respBody deleteInstanceResponseBody
128-
if err := json.Unmarshal(body, &respBody); err != nil {
129-
return xerrors.Errorf("body %s:json unmarshal error: %w", respBody, err)
130-
}
131-
132-
if !respBody.Response.IsDeleted {
133-
return xerrors.New(fmt.Sprintf("delete failed: %s", body))
134-
}
135-
136127
return nil
137128
}

0 commit comments

Comments
 (0)