{"action":"created","issue":{"url":"https://api.github.com/repos/jamielesouef/angular-trackjs/issues/2","labels_url":"https://api.github.com/repos/jamielesouef/angular-trackjs/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/jamielesouef/angular-trackjs/issues/2/comments","events_url":"https://api.github.com/repos/jamielesouef/angular-trackjs/issues/2/events","html_url":"https://github.com/jamielesouef/angular-trackjs/issues/2","id":54155693,"number":2,"title":"Ignore functionality: ignore based on pageUrl + fix when error at e.g. payload.network[1]","user":{"login":"borhub","id":5316880,"avatar_url":"https://avatars.githubusercontent.com/u/5316880?v=3","gravatar_id":"","url":"https://api.github.com/users/borhub","html_url":"https://github.com/borhub","followers_url":"https://api.github.com/users/borhub/followers","following_url":"https://api.github.com/users/borhub/following{/other_user}","gists_url":"https://api.github.com/users/borhub/gists{/gist_id}","starred_url":"https://api.github.com/users/borhub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borhub/subscriptions","organizations_url":"https://api.github.com/users/borhub/orgs","repos_url":"https://api.github.com/users/borhub/repos","events_url":"https://api.github.com/users/borhub/events{/privacy}","received_events_url":"https://api.github.com/users/borhub/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"jamielesouef","id":573632,"avatar_url":"https://avatars.githubusercontent.com/u/573632?v=3","gravatar_id":"","url":"https://api.github.com/users/jamielesouef","html_url":"https://github.com/jamielesouef","followers_url":"https://api.github.com/users/jamielesouef/followers","following_url":"https://api.github.com/users/jamielesouef/following{/other_user}","gists_url":"https://api.github.com/users/jamielesouef/gists{/gist_id}","starred_url":"https://api.github.com/users/jamielesouef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamielesouef/subscriptions","organizations_url":"https://api.github.com/users/jamielesouef/orgs","repos_url":"https://api.github.com/users/jamielesouef/repos","events_url":"https://api.github.com/users/jamielesouef/events{/privacy}","received_events_url":"https://api.github.com/users/jamielesouef/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-01-13T06:30:59Z","updated_at":"2015-01-20T03:31:15Z","closed_at":"2015-01-20T03:31:15Z","body":"Thanks for the updates.\r\n\r\n1) In ```validateError()``` we currently check against ```payload.network[0]```, but e.g. in my case the network array contains more entries and my particular error is at index 1. Can we fix this?\r\n\r\n2) The ```logError``` variable in ```onError()``` actually means \"ignore error\". Can it be renamed? It's quite confusing.\r\n\r\n3) Could we add a criterium to ignore based on the URL of the page where the error occurred (not just based on the API URL)?\r\n\r\nI'd like to do something like this:\r\n```javascript\r\n            {\r\n                statusCode: 401,\r\n                statusText: 'Unauthorized',\r\n                method: 'POST',\r\n                url: 'https://api.seek.com.au/v1/authenticate/jobseeker',\r\n                pageUrl: /.*\\/login.*/\r\n            },\r\n```\r\n\r\nAnd then ```validateError()``` would need to look similar to this (I just hacked it on to demonstrate):\r\n\r\n```javascript\r\n                    angular.forEach(errorCriteria, function (errorTest, prop) {\r\n                        if (errorTest instanceof RegExp) {\r\n                            matchedCriteria.push(errorTest.test(prop === 'pageUrl' ? payload.url : networkResponse[prop]));\r\n                        } else {\r\n                            matchedCriteria.push(prop === 'pageUrl' ? errorTest === payload.url : errorTest === networkResponse[prop]);\r\n                        }\r\n                    });\r\n```"},"comment":{"url":"https://api.github.com/repos/jamielesouef/angular-trackjs/issues/comments/70599436","html_url":"https://github.com/jamielesouef/angular-trackjs/issues/2#issuecomment-70599436","issue_url":"https://api.github.com/repos/jamielesouef/angular-trackjs/issues/2","id":70599436,"user":{"login":"jamielesouef","id":573632,"avatar_url":"https://avatars.githubusercontent.com/u/573632?v=3","gravatar_id":"","url":"https://api.github.com/users/jamielesouef","html_url":"https://github.com/jamielesouef","followers_url":"https://api.github.com/users/jamielesouef/followers","following_url":"https://api.github.com/users/jamielesouef/following{/other_user}","gists_url":"https://api.github.com/users/jamielesouef/gists{/gist_id}","starred_url":"https://api.github.com/users/jamielesouef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamielesouef/subscriptions","organizations_url":"https://api.github.com/users/jamielesouef/orgs","repos_url":"https://api.github.com/users/jamielesouef/repos","events_url":"https://api.github.com/users/jamielesouef/events{/privacy}","received_events_url":"https://api.github.com/users/jamielesouef/received_events","type":"User","site_admin":false},"created_at":"2015-01-20T03:31:14Z","updated_at":"2015-01-20T03:31:14Z","body":"Fixed in v0.1.0"}}