{"action":"created","issue":{"url":"https://api.github.com/repos/apollographql/apollo-link/issues/218","repository_url":"https://api.github.com/repos/apollographql/apollo-link","labels_url":"https://api.github.com/repos/apollographql/apollo-link/issues/218/labels{/name}","comments_url":"https://api.github.com/repos/apollographql/apollo-link/issues/218/comments","events_url":"https://api.github.com/repos/apollographql/apollo-link/issues/218/events","html_url":"https://github.com/apollographql/apollo-link/issues/218","id":271803982,"number":218,"title":"error link does not give a real error object, thus no networkError.statusCode access possible","user":{"login":"miracle2k","id":13807,"avatar_url":"https://avatars1.githubusercontent.com/u/13807?v=4","gravatar_id":"","url":"https://api.github.com/users/miracle2k","html_url":"https://github.com/miracle2k","followers_url":"https://api.github.com/users/miracle2k/followers","following_url":"https://api.github.com/users/miracle2k/following{/other_user}","gists_url":"https://api.github.com/users/miracle2k/gists{/gist_id}","starred_url":"https://api.github.com/users/miracle2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miracle2k/subscriptions","organizations_url":"https://api.github.com/users/miracle2k/orgs","repos_url":"https://api.github.com/users/miracle2k/repos","events_url":"https://api.github.com/users/miracle2k/events{/privacy}","received_events_url":"https://api.github.com/users/miracle2k/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-11-07T11:50:35Z","updated_at":"2017-11-20T22:49:32Z","closed_at":null,"author_association":"NONE","body":"I am basically using this example from the docs (\"Afterware\"): https://www.apollographql.com/docs/react/basics/network-layer.html\r\n\r\n``` \r\nimport ApolloClient from 'apollo-client';\r\nimport { HttpLink } from 'apollo-link-http';\r\nimport { onError } from 'apollo-link-error'\r\nimport { logout } from './logout';\r\nconst httpLink = new HttpLink({ uri: '/graphql' });\r\nconst logoutLink = onError(({ networkError }) => {\r\n  if (networkError.statusCode === 401) logout();\r\n})\r\nconst client = new ApolloClient({\r\n  link: logoutLink.concat(httpLink),\r\n});\r\n```\r\n\r\nThis doesn't work for me. \"networkError\" seems to be raised as a string, and only tells me \"Failed to fetch\". It doesn't have a stack, nor the .statusCode property.\r\n\r\nhttps://www.webpackbin.com/bins/-KyLJ0NyjpkxU0ggok70"},"comment":{"url":"https://api.github.com/repos/apollographql/apollo-link/issues/comments/345858033","html_url":"https://github.com/apollographql/apollo-link/issues/218#issuecomment-345858033","issue_url":"https://api.github.com/repos/apollographql/apollo-link/issues/218","id":345858033,"user":{"login":"tjpeden","id":134965,"avatar_url":"https://avatars0.githubusercontent.com/u/134965?v=4","gravatar_id":"","url":"https://api.github.com/users/tjpeden","html_url":"https://github.com/tjpeden","followers_url":"https://api.github.com/users/tjpeden/followers","following_url":"https://api.github.com/users/tjpeden/following{/other_user}","gists_url":"https://api.github.com/users/tjpeden/gists{/gist_id}","starred_url":"https://api.github.com/users/tjpeden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjpeden/subscriptions","organizations_url":"https://api.github.com/users/tjpeden/orgs","repos_url":"https://api.github.com/users/tjpeden/repos","events_url":"https://api.github.com/users/tjpeden/events{/privacy}","received_events_url":"https://api.github.com/users/tjpeden/received_events","type":"User","site_admin":false},"created_at":"2017-11-20T22:49:32Z","updated_at":"2017-11-20T22:49:32Z","author_association":"NONE","body":"This is kind of a big deal, I haven't found a solution for angular"}}
{"actor":{"display_login":"tjpeden"}}