{"action":"created","issue":{"url":"https://api.github.com/repos/guregu/dynamo/issues/23","repository_url":"https://api.github.com/repos/guregu/dynamo","labels_url":"https://api.github.com/repos/guregu/dynamo/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/guregu/dynamo/issues/23/comments","events_url":"https://api.github.com/repos/guregu/dynamo/issues/23/events","html_url":"https://github.com/guregu/dynamo/issues/23","id":176670094,"number":23,"title":"AWS errors","user":{"login":"boyand","id":4598763,"avatar_url":"https://avatars.githubusercontent.com/u/4598763?v=3","gravatar_id":"","url":"https://api.github.com/users/boyand","html_url":"https://github.com/boyand","followers_url":"https://api.github.com/users/boyand/followers","following_url":"https://api.github.com/users/boyand/following{/other_user}","gists_url":"https://api.github.com/users/boyand/gists{/gist_id}","starred_url":"https://api.github.com/users/boyand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boyand/subscriptions","organizations_url":"https://api.github.com/users/boyand/orgs","repos_url":"https://api.github.com/users/boyand/repos","events_url":"https://api.github.com/users/boyand/events{/privacy}","received_events_url":"https://api.github.com/users/boyand/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-13T15:19:42Z","updated_at":"2016-09-13T15:40:41Z","closed_at":null,"body":"First of all, thanks for putting this great library together - saves a lot of time! \r\n\r\nI have a question on the error handling. Most of the times the errors returned are the original AWS errors but this behaviour is inconsistent. For example for queries the errors are hidden behind custom ones: https://github.com/guregu/dynamo/blob/master/query.go#L42-L44.\r\n\r\nIs there a reason for this? Would it make sense to always return the original AWS error messages so that the clients can decide how to deal with them and the error handling is consistent ? "},"comment":{"url":"https://api.github.com/repos/guregu/dynamo/issues/comments/246724527","html_url":"https://github.com/guregu/dynamo/issues/23#issuecomment-246724527","issue_url":"https://api.github.com/repos/guregu/dynamo/issues/23","id":246724527,"user":{"login":"guregu","id":131059,"avatar_url":"https://avatars.githubusercontent.com/u/131059?v=3","gravatar_id":"","url":"https://api.github.com/users/guregu","html_url":"https://github.com/guregu","followers_url":"https://api.github.com/users/guregu/followers","following_url":"https://api.github.com/users/guregu/following{/other_user}","gists_url":"https://api.github.com/users/guregu/gists{/gist_id}","starred_url":"https://api.github.com/users/guregu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guregu/subscriptions","organizations_url":"https://api.github.com/users/guregu/orgs","repos_url":"https://api.github.com/users/guregu/repos","events_url":"https://api.github.com/users/guregu/events{/privacy}","received_events_url":"https://api.github.com/users/guregu/received_events","type":"User","site_admin":false},"created_at":"2016-09-13T15:40:41Z","updated_at":"2016-09-13T15:40:41Z","body":"Thanks!\r\n\r\nThose errors don't replace AWS errors. For example: when you run a GetItem or Query request and don't get any results, AWS doesn't return an error but instead returns a null item or an empty list. Without returning ErrNotFound, it would be hard to tell whether you got any results at all. Since dynamo works based on unmarshaling into objects, you would have to inspect your object(s) to see if they are still uninitialized or something like that.\r\n\r\ndynamo's Get function combines Query and GetItem, using the faster GetItem when possible (for single results) but will fall back to a slower Query if necessary. If you call Get().One() expecting one result but your query had more than one result, it will return ErrTooMany. This is to inform you of an error in your query design: something's wrong if you expect one result and get multiple. I've never seen this happen in practice. "}}
{"actor":{"display_login":"guregu"}}