Added better error handling on the calendar action. Added unit test to confirm error handling works as expected.