code: func (w *DeploymentStream) Error(err error) error {
  	if encErr := w.Encode(jsonmessage.NewError(err)); encErr != nil {
  		return encErr
  	}
  	return err
  }
docs: // Error writes the error to the jsonmessage stream. The error that is provided
  // is also returned, so that Error() can be used in return values.