code: func (r *Request) newUnstructuredResponseError(body []byte, isTextResponse bool, statusCode int, method string, retryAfter int) error {
  	// cap the amount of output we create
  	if len(body) > maxUnstructuredResponseTextBytes {
  		body = body[:maxUnstructuredResponseTextBytes]
  	}
  
  	message := "unknown"
  	if isTextResponse {
  		message = strings.TrimSpace(string(body))
  	}
  	var groupResource schema.GroupResource
  	if len(r.resource) > 0 {
  		groupResource.Group = r.content.GroupVersion.Group
  		groupResource.Resource = r.resource
  	}
  	return errors.NewGenericServerResponse(
  		statusCode,
  		method,
  		groupResource,
  		r.resourceName,
  		message,
  		retryAfter,
  		true,
  	)
  }
docs: // newUnstructuredResponseError instantiates the appropriate generic error for the provided input. It also logs the body.