Is it possible to catch errors like 502 Proxy Error in the $http service from Angular1? Normally the server is returning some HTTP status code like 500 and in the body an error message.
Errors like this are exactly the same of course, it's an 502 error and the body is some HTML code (default apache), so I get that HTML code as error message and my application wil show that code as error.
Is there a way to catch those errors and rewrite them to user friendly error messages?
then(function(response){console.log(response)}).catch(function(reason){ console.error(reason) //showError();})