agent/eventhandler/task_handler.go
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)
	}
}
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)
	}
}
// handleInvalidParamException removes the event from event queue when its parameters are
// invalid to reduce redundant API call