Currently, in the Liferay.CalendarUtil.getEvents() method, the failure callback is called from an anonymous function enclosing it:
This is causing
LPS-45223 because the failure callback is not passed to Liferay.CalendarUtil.getEvents() in edit_calendar_booking.jsp, resulting in a call to undefined.
If we pass failure directly to A.io.request(), however (as it is done in Liferay.CalendarUtil.getEvent() and Liferay.CalendarUtil.invokeService()), the A.io.request() will take care of not calling an undefined value. This way, we should call the failure callback the same way it is called in getEvent() and invokeService().