What is the best approach for handling connection errors in Angular?
When using the $http POST service:
dossierService.getDossier(uid)
.then(function (result) {
vm.dossier = result.dossier;
}, function (error) {
handleError(error)
});//end dossierService.getDossier(uid)
If a connection problem occurs, an error will be returned:
POST http://192.168.25.1:8080/api/query net::ERR_CONNECTION_TIMED_OUT
How can I display the specific error message to the user to communicate what exactly went wrong?