3

As the query implies, API calls being blocked occasionally and doesn't return the response but time out. Not sure what's going on. I did debug to check whether anything wrong with the server side implementation and I have had found that the API request hasn't hitting the server side. Do any one face this before. If then, pl. suggest me any workaround.

Sample Code:

 this.userProvider.getProfileDetails()
      .subscribe((data: IProviderProfile) => {
        },
        (err: INetworkError) => {
        });

Provider

getProfileDetails(): Observable<any> {
        return this.apiProvider.authJsonGet(this.config.apiEndpoint + this.config.profileDetailsUrl);
}

public authJsonGet(url: string, params?: URLSearchParams): Observable<any> {
        return this.intercept(url, RequestMethod.Get, this.httpGet(url, params));
  }

Don't be confused, were intercept is a custom function which do handle session expire, no big deal inside it.

Thanking you.

Stella
  • 1,817
  • 6
  • 30
  • 55
  • what is the turn around time for web service? – Aravind Nov 22 '17 at 11:41
  • 1
    I've set *1 minute* as timeout for the calls. – Stella Nov 22 '17 at 11:43
  • how much time the service takes to respond? I expect this to be because of the service – Aravind Nov 22 '17 at 11:45
  • 1
    It responds normally sometimes, at some point it doesn't. I tried increasing the time out value but it dint help. – Stella Nov 22 '17 at 11:48
  • network calls usually times out after a certain time. [**read here**](https://stackoverflow.com/questions/12009423/what-does-status-canceled-for-a-resource-mean-in-chrome-developer-tools) – Aravind Nov 22 '17 at 11:51
  • I debugged in chrome dev tool, and whenever the issue arises status of the network call indicates as `stalled`, which means it doesn't hitting the server. – Stella Nov 22 '17 at 11:55

0 Answers0