code below doesn't run the error function. it runs success function when there is response.
what callback should be used when the requested URL exists or not ? or not found ?
Code:
$.ajax({
                                     type: "GET",
                                     url: appServer,
                                     data: "action=config",
                                     success: function(response){
                                                 alert('Success');
                                        },
                                      error: function(){
                  
alert('Error');
}
)};