func()

in pkg/client/sonar/sonar.go [72:86]


func (sc *Client) checkError(response *resty.Response, err error) error {
	if err != nil {
		return fmt.Errorf("response error: %w", err)
	}

	if response == nil {
		return errors.New("empty response")
	}

	if response.IsError() {
		return HTTPError{message: response.String(), code: response.StatusCode()}
	}

	return nil
}