[+FEAT] Add method to set the state when loading (in case of an AJAX-error)