{"action":"closed","issue":{"url":"https://api.github.com/repos/Cardshifter/Cardshifter/issues/379","repository_url":"https://api.github.com/repos/Cardshifter/Cardshifter","labels_url":"https://api.github.com/repos/Cardshifter/Cardshifter/issues/379/labels{/name}","comments_url":"https://api.github.com/repos/Cardshifter/Cardshifter/issues/379/comments","events_url":"https://api.github.com/repos/Cardshifter/Cardshifter/issues/379/events","html_url":"https://github.com/Cardshifter/Cardshifter/issues/379","id":104773255,"number":379,"title":"Generic ErrorMessage","user":{"login":"jacwah","id":3816754,"avatar_url":"https://avatars.githubusercontent.com/u/3816754?v=3","gravatar_id":"","url":"https://api.github.com/users/jacwah","html_url":"https://github.com/jacwah","followers_url":"https://api.github.com/users/jacwah/followers","following_url":"https://api.github.com/users/jacwah/following{/other_user}","gists_url":"https://api.github.com/users/jacwah/gists{/gist_id}","starred_url":"https://api.github.com/users/jacwah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacwah/subscriptions","organizations_url":"https://api.github.com/users/jacwah/orgs","repos_url":"https://api.github.com/users/jacwah/repos","events_url":"https://api.github.com/users/jacwah/events{/privacy}","received_events_url":"https://api.github.com/users/jacwah/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Cardshifter/Cardshifter/labels/refactor","name":"refactor","color":"d4c5f9"},{"url":"https://api.github.com/repos/Cardshifter/Cardshifter/labels/server","name":"server","color":"eb6420"}],"state":"closed","locked":false,"assignee":{"login":"jacwah","id":3816754,"avatar_url":"https://avatars.githubusercontent.com/u/3816754?v=3","gravatar_id":"","url":"https://api.github.com/users/jacwah","html_url":"https://github.com/jacwah","followers_url":"https://api.github.com/users/jacwah/followers","following_url":"https://api.github.com/users/jacwah/following{/other_user}","gists_url":"https://api.github.com/users/jacwah/gists{/gist_id}","starred_url":"https://api.github.com/users/jacwah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacwah/subscriptions","organizations_url":"https://api.github.com/users/jacwah/orgs","repos_url":"https://api.github.com/users/jacwah/repos","events_url":"https://api.github.com/users/jacwah/events{/privacy}","received_events_url":"https://api.github.com/users/jacwah/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Cardshifter/Cardshifter/milestones/14","html_url":"https://github.com/Cardshifter/Cardshifter/milestones/0.6.2","labels_url":"https://api.github.com/repos/Cardshifter/Cardshifter/milestones/14/labels","id":1147040,"number":14,"title":"0.6.2","description":"","creator":{"login":"Zomis","id":1405379,"avatar_url":"https://avatars.githubusercontent.com/u/1405379?v=3","gravatar_id":"","url":"https://api.github.com/users/Zomis","html_url":"https://github.com/Zomis","followers_url":"https://api.github.com/users/Zomis/followers","following_url":"https://api.github.com/users/Zomis/following{/other_user}","gists_url":"https://api.github.com/users/Zomis/gists{/gist_id}","starred_url":"https://api.github.com/users/Zomis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zomis/subscriptions","organizations_url":"https://api.github.com/users/Zomis/orgs","repos_url":"https://api.github.com/users/Zomis/repos","events_url":"https://api.github.com/users/Zomis/events{/privacy}","received_events_url":"https://api.github.com/users/Zomis/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":18,"state":"open","created_at":"2015-06-03T12:01:00Z","updated_at":"2016-04-03T20:57:41Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-09-03T20:18:45Z","updated_at":"2016-04-03T20:57:41Z","closed_at":"2016-04-03T20:57:41Z","body":"*[Original chat discussion](http://chat.stackexchange.com/rooms/16134/conversation/errormessage-discussion) between me and @Zomis.*\r\n\r\nThere are lots of reasons why a request from a client may fail. Currently errors are communicated in a range of different ways:\r\n\r\n- `ChatMessage`: \"You cannot invite yourself.\"\r\n- `ServerErrorMessage`: \"Invalid gameType specified.\"\r\n- `WelcomeMessage`: \"User name invalid\"\r\n\r\nGenerally, a client will want to handle all errors in a similar way. The server should not enforce a particular one (with `ChatMessage`).\r\n\r\nCreate a generic outgoing `ErrorMessage` and use it instead of other constructs currently used. It should include some indication whether it was caused by the client or the server.\r\n\r\n    # Possible implementation\r\n    {\r\n        \"command\": \"error\",\r\n        \"message\": \"You cannot invite yourself.\",\r\n        \"cause\": \"client\"\r\n    }"}}