code: func convertError(err error, format string, args ...interface{}) error {
  	message := format
  	if len(args) > 0 {
  		message = fmt.Sprintf(format, args...)
  	}
  
  	cause := errs.Cause(err)
  	if statusError, ok := cause.(*kubeErrors.StatusError); ok {
  		message = fmt.Sprintf("%s: %s", message, statusError.Error())
  		// Pass through certain HTTP statuses to our API response
  		if kubeErrors.IsBadRequest(statusError) {
  			return errors.NewBadParameterErrorFromString(message)
  		} else if kubeErrors.IsNotFound(statusError) {
  			return errors.NewNotFoundErrorFromString(message)
  		}
  	}
  	return errors.NewInternalError(nil /* unused */, errs.Wrap(err, message))
  }
docs: // convertError converts a Kubernetes API error into an error suitable to be
  // passed to jsonapi.ErrorToJSONAPIError. The format and args arguments are used
  // to construct an error message, in a similar fashion to fmt.Sprintf.