Catch any errors while registering AjaxMethods