{"action":"created","issue":{"url":"https://api.github.com/repos/johannesboyne/gofakes3/issues/12","repository_url":"https://api.github.com/repos/johannesboyne/gofakes3","labels_url":"https://api.github.com/repos/johannesboyne/gofakes3/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/johannesboyne/gofakes3/issues/12/comments","events_url":"https://api.github.com/repos/johannesboyne/gofakes3/issues/12/events","html_url":"https://github.com/johannesboyne/gofakes3/pull/12","id":393788817,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwNzA1ODY1","number":12,"title":"Feature/spec errors","user":{"login":"shabbyrobe","id":288426,"node_id":"MDQ6VXNlcjI4ODQyNg==","avatar_url":"https://avatars3.githubusercontent.com/u/288426?v=4","gravatar_id":"","url":"https://api.github.com/users/shabbyrobe","html_url":"https://github.com/shabbyrobe","followers_url":"https://api.github.com/users/shabbyrobe/followers","following_url":"https://api.github.com/users/shabbyrobe/following{/other_user}","gists_url":"https://api.github.com/users/shabbyrobe/gists{/gist_id}","starred_url":"https://api.github.com/users/shabbyrobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shabbyrobe/subscriptions","organizations_url":"https://api.github.com/users/shabbyrobe/orgs","repos_url":"https://api.github.com/users/shabbyrobe/repos","events_url":"https://api.github.com/users/shabbyrobe/events{/privacy}","received_events_url":"https://api.github.com/users/shabbyrobe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-23T23:44:59Z","updated_at":"2019-01-01T16:51:15Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/johannesboyne/gofakes3/pulls/12","html_url":"https://github.com/johannesboyne/gofakes3/pull/12","diff_url":"https://github.com/johannesboyne/gofakes3/pull/12.diff","patch_url":"https://github.com/johannesboyne/gofakes3/pull/12.patch"},"body":"Hello again! Thank you for inviting me to collaborate. I have really enjoyed working on the code here so far, it has been very easy to work with.\r\n\r\nThis PR is another structural one, and once again it is a somewhat deep change. It adds support for backends to return rich errors that reflect the XML structure S3 returns. I've used a few tricks to pull that off; the errors returned are actually the same serialisable values the XML marshaller will return to the client!\r\n\r\nYou can also, in a pinch, just return ErrorCode directly as the HTTP handler will turn it into an XML response just the same. It's this design decision I'm a bit less certain of but it was convenient enough in practice and helped with the refactoring of the existing backends. I am just a bit more concerned it might give Backend authors license to leave out too much information. Maybe it can evolve over time to the helper constructor style, like `BucketNotFound()` and friends, then we can remove this quirk of ErrorCodes. What do you think?\r\n\r\nThere are a lot of extra errors implemented here than the core ones that the backends needed to support the basic functionality. I did this in order to try to put the design decisions I had made to the test to make sure I had laid enough groundwork to cover future changes. Things like \"RequestTimeTooSkewed\" really didn't need to be implemented from a usability point of view (I didn't even realise that was a thing AWS would fail on!), but it was very useful as a driver to help get the shape and behaviour of the derived response types right (and it can't hurt to have a few extra checks around!) You can see from the commit history that it took me a few goes, and that doesn't include the failed attempts that never got committed in the first place 😆 "},"comment":{"url":"https://api.github.com/repos/johannesboyne/gofakes3/issues/comments/450742866","html_url":"https://github.com/johannesboyne/gofakes3/pull/12#issuecomment-450742866","issue_url":"https://api.github.com/repos/johannesboyne/gofakes3/issues/12","id":450742866,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDc0Mjg2Ng==","user":{"login":"shabbyrobe","id":288426,"node_id":"MDQ6VXNlcjI4ODQyNg==","avatar_url":"https://avatars3.githubusercontent.com/u/288426?v=4","gravatar_id":"","url":"https://api.github.com/users/shabbyrobe","html_url":"https://github.com/shabbyrobe","followers_url":"https://api.github.com/users/shabbyrobe/followers","following_url":"https://api.github.com/users/shabbyrobe/following{/other_user}","gists_url":"https://api.github.com/users/shabbyrobe/gists{/gist_id}","starred_url":"https://api.github.com/users/shabbyrobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shabbyrobe/subscriptions","organizations_url":"https://api.github.com/users/shabbyrobe/orgs","repos_url":"https://api.github.com/users/shabbyrobe/repos","events_url":"https://api.github.com/users/shabbyrobe/events{/privacy}","received_events_url":"https://api.github.com/users/shabbyrobe/received_events","type":"User","site_admin":false},"created_at":"2019-01-01T16:51:15Z","updated_at":"2019-01-01T16:51:15Z","author_association":"COLLABORATOR","body":"Thanks heaps for the review!\r\n\r\nI've fixed the commend and added the test. I agree that `gofakes3.go` was getting a bit big - I really wanted to start breaking it down into separate pieces too. I was saving that for a later PR, but there's no time like the present! I've just decomposed into separate files for now, which helps a bit; as you say, we can clean this up further in future improvements."}}
{"actor":{"display_login":"shabbyrobe"}}