{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/relay/issues/837","repository_url":"https://api.github.com/repos/facebook/relay","labels_url":"https://api.github.com/repos/facebook/relay/issues/837/labels{/name}","comments_url":"https://api.github.com/repos/facebook/relay/issues/837/comments","events_url":"https://api.github.com/repos/facebook/relay/issues/837/events","html_url":"https://github.com/facebook/relay/issues/837","id":133418667,"number":837,"title":"Relay call renderFailure if network requests timeout","user":{"login":"blatch","id":14333729,"avatar_url":"https://avatars.githubusercontent.com/u/14333729?v=3","gravatar_id":"","url":"https://api.github.com/users/blatch","html_url":"https://github.com/blatch","followers_url":"https://api.github.com/users/blatch/followers","following_url":"https://api.github.com/users/blatch/following{/other_user}","gists_url":"https://api.github.com/users/blatch/gists{/gist_id}","starred_url":"https://api.github.com/users/blatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blatch/subscriptions","organizations_url":"https://api.github.com/users/blatch/orgs","repos_url":"https://api.github.com/users/blatch/repos","events_url":"https://api.github.com/users/blatch/events{/privacy}","received_events_url":"https://api.github.com/users/blatch/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-02-13T09:59:27Z","updated_at":"2016-09-03T01:02:56Z","closed_at":"2016-09-03T01:02:56Z","body":"No answer to this on SO (http://stackoverflow.com/questions/35312277/why-doesnt-relay-call-renderfailure-if-network-requests-timeout) so I guess it's a bug:\r\n\r\nI've got a `renderLoading` function that shows a spinner. I've also got a `renderFailure` function that contains a button to let a user retry a failed request. Finally, my network layer is configured with timeouts and retry delays:\r\n```\r\nfetchTimeout: 10000,\r\nretryDelays: [1000, 2000, 4000, 8000, 8000],\r\n```\r\nIf I take my local graphql server offline and and load my app, the loading spinner spins. If I start my server, within a few seconds, data is loaded, so the retries are working.\r\n\r\nHowever, if I only do 2 retries (`retryDelays: [1000, 2000]`), take my server offline, reload my app and wait, the loading spinner is never replaced by the retry button I've got in my `renderFailed` function. If I bring my server back online, no data is loaded, which shows that no retries are taking place, as expected.\r\n\r\nIs this a bug or am I missing something? Why doesn't relay call `renderFailed` (which I've tested separately and it works) if all network requests timeout and there are no more retries to try?"},"comment":{"url":"https://api.github.com/repos/facebook/relay/issues/comments/244517522","html_url":"https://github.com/facebook/relay/issues/837#issuecomment-244517522","issue_url":"https://api.github.com/repos/facebook/relay/issues/837","id":244517522,"user":{"login":"wincent","id":7074,"avatar_url":"https://avatars.githubusercontent.com/u/7074?v=3","gravatar_id":"","url":"https://api.github.com/users/wincent","html_url":"https://github.com/wincent","followers_url":"https://api.github.com/users/wincent/followers","following_url":"https://api.github.com/users/wincent/following{/other_user}","gists_url":"https://api.github.com/users/wincent/gists{/gist_id}","starred_url":"https://api.github.com/users/wincent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wincent/subscriptions","organizations_url":"https://api.github.com/users/wincent/orgs","repos_url":"https://api.github.com/users/wincent/repos","events_url":"https://api.github.com/users/wincent/events{/privacy}","received_events_url":"https://api.github.com/users/wincent/received_events","type":"User","site_admin":false},"created_at":"2016-09-03T01:02:56Z","updated_at":"2016-09-03T01:02:56Z","body":"Going to close this one due to inactivity. Please comment though if this is still an issue for you and we'll re-open it."}}
{"actor":{"display_login":"wincent"}}