Angular 2 http.get response error 502 bad gateway

9.6k views Asked by At

I am having angular 2 typescript application. I have 3 tabs. When I click on each tab,the data will be displayed in the card.The data is accessed via rest api using angular HTTP service https://angular.io/docs/ts/latest/guide/server-communication.html#!#fetch-data. It returns observable. Most of the time, I get this below error when seen in the chrome browser console : 502 Bad Gateway. After refreshing the page for couple of times it works. How to fix this issue? Is it the problem with navigation between the tabs breaking the network? By adding retryWhen method of observable in my service would fix the problem?

GET http://restapi/api/data 502 (Bad Gateway) Failed to load resource: the server responded with a status of 502 (Bad Gateway)

0

There are 0 answers