code: func handleInvalidParamException(err error, events *list.List, eventToSubmit *list.Element) {
  	if utils.IsAWSErrorCodeEqual(err, ecs.ErrCodeInvalidParameterException) {
  		event := eventToSubmit.Value.(*sendableEvent)
  		seelog.Warnf("TaskHandler: Event is sent with invalid parameters; just removing: %s", event.toString())
  		events.Remove(eventToSubmit)
  	}
  }
docs: // handleInvalidParamException removes the event from event queue when its parameters are
  // invalid to reduce redundant API call