{"action":"closed","issue":{"url":"https://api.github.com/repos/relay-tools/react-router-relay/issues/156","repository_url":"https://api.github.com/repos/relay-tools/react-router-relay","labels_url":"https://api.github.com/repos/relay-tools/react-router-relay/issues/156/labels{/name}","comments_url":"https://api.github.com/repos/relay-tools/react-router-relay/issues/156/comments","events_url":"https://api.github.com/repos/relay-tools/react-router-relay/issues/156/events","html_url":"https://github.com/relay-tools/react-router-relay/issues/156","id":153663237,"number":156,"title":"Redirect in route render","user":{"login":"schickling","id":1567498,"avatar_url":"https://avatars.githubusercontent.com/u/1567498?v=3","gravatar_id":"","url":"https://api.github.com/users/schickling","html_url":"https://github.com/schickling","followers_url":"https://api.github.com/users/schickling/followers","following_url":"https://api.github.com/users/schickling/following{/other_user}","gists_url":"https://api.github.com/users/schickling/gists{/gist_id}","starred_url":"https://api.github.com/users/schickling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schickling/subscriptions","organizations_url":"https://api.github.com/users/schickling/orgs","repos_url":"https://api.github.com/users/schickling/repos","events_url":"https://api.github.com/users/schickling/events{/privacy}","received_events_url":"https://api.github.com/users/schickling/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-08T15:54:48Z","updated_at":"2016-05-08T16:01:39Z","closed_at":"2016-05-08T16:01:39Z","body":"First of all thanks for actively maintaining this library! 👍 \r\n\r\nI was wondering what's currently the best practise to do a redirect when a Relay route returns an error?\r\nA minimal workaround could look like this but there has to be a better way.\r\n\r\n```js\r\nconst render = ({ error, props, element }) => {\r\n  if (error) {\r\n    window.location.pathname = '/'\r\n  }\r\n\r\n  return React.cloneElement(element, props)\r\n}\r\n\r\nexport default (\r\n  <Route path='/'>\r\n    <Route path=':id' component={RootView} queries={ViewerQuery} render={render} />\r\n  </Route>\r\n)\r\n```"}}