Fixes for custom events from the api
Adding basic exception for invalid custom event registration through api