add_action and Ajax

I skimmed through the plugin’s code and you could try to use the define_public_hooks() method of the Plugin_Name class to register your ajax action callbacks of the Plugin_Name_Public class:

/**
 * Register all of the hooks related to the public-facing functionality
 * of the plugin.
 *
 * @since    1.0.0
 * @access   private
 */
private function define_public_hooks() {

    $plugin_public = new Plugin_Name_Public( $this->get_plugin_name(), $this->get_version() );

    $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
    $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );

    // Add your ajax actions here instead 
    $script_handle="userprofilesumbit";   
    $this->loader->add_action(  'wp_ajax_' . $script_handle, $plugin_public, 'userprofileform_process' );
    $this->loader->add_action(  'wp_ajax_nopriv_' . $script_handle, $plugin_public, 'userprofileform_process' );

}

error code: 523