{"action":"opened","issue":{"url":"https://api.github.com/repos/Sealious/Sealious/issues/179","labels_url":"https://api.github.com/repos/Sealious/Sealious/issues/179/labels{/name}","comments_url":"https://api.github.com/repos/Sealious/Sealious/issues/179/comments","events_url":"https://api.github.com/repos/Sealious/Sealious/issues/179/events","html_url":"https://github.com/Sealious/Sealious/issues/179","id":97438995,"number":179,"title":"ResourceManager should throw an error if asked to access a non-existent ResourceType","user":{"login":"groovy354","id":2697916,"avatar_url":"https://avatars.githubusercontent.com/u/2697916?v=3","gravatar_id":"","url":"https://api.github.com/users/groovy354","html_url":"https://github.com/groovy354","followers_url":"https://api.github.com/users/groovy354/followers","following_url":"https://api.github.com/users/groovy354/following{/other_user}","gists_url":"https://api.github.com/users/groovy354/gists{/gist_id}","starred_url":"https://api.github.com/users/groovy354/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groovy354/subscriptions","organizations_url":"https://api.github.com/users/groovy354/orgs","repos_url":"https://api.github.com/users/groovy354/repos","events_url":"https://api.github.com/users/groovy354/events{/privacy}","received_events_url":"https://api.github.com/users/groovy354/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Sealious/Sealious/labels/DX","name":"DX","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-27T11:08:48Z","updated_at":"2015-07-27T11:08:48Z","closed_at":null,"body":"When calling, for example, `Sealious.ResourceManager.list_by_type(context, \"non-existent-type\")` this error appears:\r\n> `Cannot read property 'get_access_strategy' of undefined`\r\n>    `at list_by_type (/home/kuba/Projekty/Sealious-dev/Sealious/lib/core-services/resource-manager.js:100:39)`\r\n> ...\r\n\r\nIt should be changed to a nicer Sealious.Error, which finds a possible solution to the problem, like so:\r\n\r\n> `ResourceManager was asked to access resources of type 'non-existent-type'. Did you mean 'existent-type'?\r\n\r\nThe suggested existing resource type should be taken from registered resource types and it should be the one most similar to the requested type (using Levenshtein distance as a measure of difference)"}}