Added error codes to cancel-event