code: func formatError(format string, err error) error {
  	if s, ok := err.(errors.APIStatus); ok {
  		se := &errors.StatusError{ErrStatus: s.Status()}
  		se.ErrStatus.Message = fmt.Sprintf(format, se.ErrStatus.Message)
  		return se
  	}
  	return fmt.Errorf(format, err)
  }
docs: // formatError preserves the type of an API message but alters the message. Expects
  // a single argument format string, and returns the wrapped error.