How to handle Angular JS api errors using response interceptors
Please keep in mind that this post was written more than 2 years ago and might be outdated.
http://blog.brunoscopelliti.com/http-response-interceptors
http://blog.brunoscopelliti.com/http-response-interceptors