E0427 Event not added
Why
calendar.addEvent checks the event before any platform sees it: it needs a title, and a start and an end that are real dates with the end not before the start. Otherwise the calendar refused it, such as when the device has no calendar the app may write to, the user deleted the event in iOS's calendar editor, or an event was added while that editor was already open.
How to fix it
Give the event a title and real dates, with the end at or after the start. Ask the user to add a calendar account when there is none.
In a terminal
duolith explain E0427