code: func CheckErrorStatus(code int, res *http.Response, isPlatformError ...bool) error {
  	err := CheckError(res)
  	if len(isPlatformError) > 0 && isPlatformError[0] {
  		err = CheckError(res, true)
  	}
  	if err != nil {
  		return err
  	}
  
  	if res.StatusCode != code {
  		return fmt.Errorf("unexpected status code: %s", res.Status)
  	}
  
  	return nil
  }
docs: // CheckErrorStatus for status and any error in the response.