{"action":"closed","issue":{"url":"https://api.github.com/repos/alecthomas/voluptuous/issues/140","labels_url":"https://api.github.com/repos/alecthomas/voluptuous/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/alecthomas/voluptuous/issues/140/comments","events_url":"https://api.github.com/repos/alecthomas/voluptuous/issues/140/events","html_url":"https://github.com/alecthomas/voluptuous/issues/140","id":123375796,"number":140,"title":"Make error messages more useful by including the invalid value","user":{"login":"thatneat","id":3341011,"avatar_url":"https://avatars.githubusercontent.com/u/3341011?v=3","gravatar_id":"","url":"https://api.github.com/users/thatneat","html_url":"https://github.com/thatneat","followers_url":"https://api.github.com/users/thatneat/followers","following_url":"https://api.github.com/users/thatneat/following{/other_user}","gists_url":"https://api.github.com/users/thatneat/gists{/gist_id}","starred_url":"https://api.github.com/users/thatneat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatneat/subscriptions","organizations_url":"https://api.github.com/users/thatneat/orgs","repos_url":"https://api.github.com/users/thatneat/repos","events_url":"https://api.github.com/users/thatneat/events{/privacy}","received_events_url":"https://api.github.com/users/thatneat/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-21T22:54:16Z","updated_at":"2016-01-19T22:24:53Z","closed_at":"2016-01-19T22:24:53Z","body":"As a user, I want the built-in error messages to contain some information about the validation rule that was violated and the value that violated it, to shorten my debugging cycle.\r\n\r\ncurrently, error messages are generally something like `voluptuous.MultipleInvalid: invalid list value @ data['top_level_key'][0]`. \r\nA better error message would be `voluptuous.MultipleInvalid: invalid list value @ data['top_level_key'][0]. Expected one of ['x', 'y', 'z'] but got 'Eyjafjallajökull'.`\r\n\r\nThis would make Voluptuous much more pleasant to work with.\r\nThere will of course be some cases where the rule/value isn't that simple, but they could be truncated/abbreviated in those cases.\r\n"}}