fix: admin change-bucket-owner return status

This commit is contained in:
Ben McClelland
2024-04-11 16:11:59 -07:00
parent 53a50df742
commit 5ec2de544c
+5 -1
View File
@@ -373,12 +373,16 @@ func changeBucketOwner(ctx *cli.Context) error {
if err != nil {
return fmt.Errorf("failed to send the request: %w", err)
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
return err
}
defer resp.Body.Close()
if resp.StatusCode >= 400 {
return fmt.Errorf("%s", body)
}
fmt.Println(string(body))