Skip to content

Commit

Permalink
fix(cor-943) Do not hide error when updating advanced service
Browse files Browse the repository at this point in the history
  • Loading branch information
mzottola committed Jun 27, 2024
1 parent 73ebfc3 commit f80bedf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ func (c ClusterAdvancedSettingsService) UpdateClusterAdvancedSettings(organizati
defer respPostAdvancedSettings.Body.Close()

if err != nil || respPostAdvancedSettings.StatusCode >= 400 {
return err
body, _ := io.ReadAll(respPostAdvancedSettings.Body)
return errors.New("Cannot update cluster advanced settings :" + string(body))
}

return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ func (c ServiceAdvancedSettingsService) UpdateServiceAdvancedSettings(serviceTyp
defer respPostAdvancedSettings.Body.Close()

if err != nil || respPostAdvancedSettings.StatusCode >= 400 {
return err
body, _ := io.ReadAll(respPostAdvancedSettings.Body)
return errors.New("Cannot update service advanced settings :" + string(body))
}

return nil
Expand Down

0 comments on commit f80bedf

Please sign in to comment.