{"action":"closed","issue":{"url":"https://api.github.com/repos/MovingBlocks/Terasology/issues/2174","repository_url":"https://api.github.com/repos/MovingBlocks/Terasology","labels_url":"https://api.github.com/repos/MovingBlocks/Terasology/issues/2174/labels{/name}","comments_url":"https://api.github.com/repos/MovingBlocks/Terasology/issues/2174/comments","events_url":"https://api.github.com/repos/MovingBlocks/Terasology/issues/2174/events","html_url":"https://github.com/MovingBlocks/Terasology/issues/2174","id":135315183,"number":2174,"title":"Better error message when console-requesting ambiguous items","user":{"login":"Cervator","id":1063833,"avatar_url":"https://avatars.githubusercontent.com/u/1063833?v=3","gravatar_id":"","url":"https://api.github.com/users/Cervator","html_url":"https://github.com/Cervator","followers_url":"https://api.github.com/users/Cervator/followers","following_url":"https://api.github.com/users/Cervator/following{/other_user}","gists_url":"https://api.github.com/users/Cervator/gists{/gist_id}","starred_url":"https://api.github.com/users/Cervator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cervator/subscriptions","organizations_url":"https://api.github.com/users/Cervator/orgs","repos_url":"https://api.github.com/users/Cervator/repos","events_url":"https://api.github.com/users/Cervator/events{/privacy}","received_events_url":"https://api.github.com/users/Cervator/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MovingBlocks/Terasology/labels/Contributor-friendly","name":"Contributor-friendly","color":"7AB6E4"},{"url":"https://api.github.com/repos/MovingBlocks/Terasology/labels/UI","name":"UI","color":"06FF06"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-22T04:44:56Z","updated_at":"2016-03-25T18:01:41Z","closed_at":"2016-03-25T18:01:41Z","body":"At present if you `giveitem axe` while running JoshariasSurvival you get:\r\n\r\n`org.terasology.logic.console.commandSystem.exceptions.CommandExecutionException: java.lang.IllegalArgumentException: No block found for 'axe'`\r\n\r\nPlus a big stacktrace in the game log. Works fine with plain Core. The issue is that both \"Core:axe\" and \"ManualLabor:axe\" exist, as easily visible with `search axe` - so really the problem isn't that `axe` doesn't exist, it is that the reference is too vague.\r\n\r\nWe should present a user a better error message and ideally offer the available suggestions (\"It looks like you're trying to request an 'axe' - did you perhaps mean 'Core:axe' or 'ManualLabor:axe'?\" - with Clippy mascot optional..)\r\n\r\nThe stacktrace in the log also isn't very useful since yes we know what the issue is. Probably a simpler warning should be logged instead (and if it is giveItem maybe it should say item instead of block)\r\n\r\n@Limeth do you think this is similar to some of the auto-completion we've done in the past or maybe something the `search` command or some other method could achieve easily? I also wonder if there's a way to make `search axe` return only whole words or something .. \r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/31107352-better-error-message-when-console-requesting-ambiguous-items?utm_campaign=plugin&utm_content=tracker%2F5279&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F5279&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"}}