$.ajax error callback

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 ?

$.ajax({
                                     type: "GET",
                                     url: appServer,
                                     data: "action=config",
                                     success: function(response){
                                                 alert('Success');
                                        },
                                      error: function(){
                  
alert('Error');
}
)};

$.ajax({
type: “GET”,
url: appServer,
data: “action=config”,
success: function(response){
alert(‘Success’);
},
error: function(){
alert(‘Error’);
}
});

In the end you mixed up )} instead of })

:slight_smile: