🔨 Replace ApiServer naming with Hub

This commit is contained in:
M. Mert Yildiran
2022-11-26 22:06:06 +03:00
parent 5bd8aea8b9
commit 671aa783c5
15 changed files with 100 additions and 100 deletions

View File

@@ -29,7 +29,7 @@ func Do(req *http.Request, client *http.Client) (*http.Response, error) {
func checkError(response *http.Response, errInOperation error) (*http.Response, error) {
if errInOperation != nil {
return response, errInOperation
// Check only if status != 200 (and not status >= 300). Agent APIs return only 200 on success.
// Check only if status != 200 (and not status >= 300). Hub return only 200 on success.
} else if response.StatusCode != http.StatusOK {
body, err := io.ReadAll(response.Body)
response.Body.Close()