{"action":"created","issue":{"url":"https://api.github.com/repos/ptaoussanis/sente/issues/266","repository_url":"https://api.github.com/repos/ptaoussanis/sente","labels_url":"https://api.github.com/repos/ptaoussanis/sente/issues/266/labels{/name}","comments_url":"https://api.github.com/repos/ptaoussanis/sente/issues/266/comments","events_url":"https://api.github.com/repos/ptaoussanis/sente/issues/266/events","html_url":"https://github.com/ptaoussanis/sente/issues/266","id":177238832,"number":266,"title":"Add reason why an event is a bad-event","user":{"login":"arichiardi","id":1724788,"avatar_url":"https://avatars.githubusercontent.com/u/1724788?v=3","gravatar_id":"","url":"https://api.github.com/users/arichiardi","html_url":"https://github.com/arichiardi","followers_url":"https://api.github.com/users/arichiardi/followers","following_url":"https://api.github.com/users/arichiardi/following{/other_user}","gists_url":"https://api.github.com/users/arichiardi/gists{/gist_id}","starred_url":"https://api.github.com/users/arichiardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arichiardi/subscriptions","organizations_url":"https://api.github.com/users/arichiardi/orgs","repos_url":"https://api.github.com/users/arichiardi/repos","events_url":"https://api.github.com/users/arichiardi/events{/privacy}","received_events_url":"https://api.github.com/users/arichiardi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ptaoussanis/sente/labels/enhancement","name":"enhancement","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"ptaoussanis","id":160011,"avatar_url":"https://avatars.githubusercontent.com/u/160011?v=3","gravatar_id":"","url":"https://api.github.com/users/ptaoussanis","html_url":"https://github.com/ptaoussanis","followers_url":"https://api.github.com/users/ptaoussanis/followers","following_url":"https://api.github.com/users/ptaoussanis/following{/other_user}","gists_url":"https://api.github.com/users/ptaoussanis/gists{/gist_id}","starred_url":"https://api.github.com/users/ptaoussanis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptaoussanis/subscriptions","organizations_url":"https://api.github.com/users/ptaoussanis/orgs","repos_url":"https://api.github.com/users/ptaoussanis/repos","events_url":"https://api.github.com/users/ptaoussanis/events{/privacy}","received_events_url":"https://api.github.com/users/ptaoussanis/received_events","type":"User","site_admin":false},"assignees":[{"login":"ptaoussanis","id":160011,"avatar_url":"https://avatars.githubusercontent.com/u/160011?v=3","gravatar_id":"","url":"https://api.github.com/users/ptaoussanis","html_url":"https://github.com/ptaoussanis","followers_url":"https://api.github.com/users/ptaoussanis/followers","following_url":"https://api.github.com/users/ptaoussanis/following{/other_user}","gists_url":"https://api.github.com/users/ptaoussanis/gists{/gist_id}","starred_url":"https://api.github.com/users/ptaoussanis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptaoussanis/subscriptions","organizations_url":"https://api.github.com/users/ptaoussanis/orgs","repos_url":"https://api.github.com/users/ptaoussanis/repos","events_url":"https://api.github.com/users/ptaoussanis/events{/privacy}","received_events_url":"https://api.github.com/users/ptaoussanis/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2016-09-15T17:36:29Z","updated_at":"2016-09-20T16:25:39Z","closed_at":null,"body":"Just putting this here, more like an enhancement.\r\n\r\nAt the moment we receive a `bad-event` event when `sente` cannot [validate](https://github.com/ptaoussanis/sente/blob/master/src/taoensso/sente.cljc#L116) the incoming event.\r\n\r\nIt would be great if there was the reason why it did not validate in the payload. It could be in the form of an `ex-info` directly and even be `clojure.spec`-ed. It is a pretty straightforward spec to create.\r\n\r\nI am willing to help on this if you are ok with it (with or without `clojure.spec`)."},"comment":{"url":"https://api.github.com/repos/ptaoussanis/sente/issues/comments/248354547","html_url":"https://github.com/ptaoussanis/sente/issues/266#issuecomment-248354547","issue_url":"https://api.github.com/repos/ptaoussanis/sente/issues/266","id":248354547,"user":{"login":"arichiardi","id":1724788,"avatar_url":"https://avatars.githubusercontent.com/u/1724788?v=3","gravatar_id":"","url":"https://api.github.com/users/arichiardi","html_url":"https://github.com/arichiardi","followers_url":"https://api.github.com/users/arichiardi/followers","following_url":"https://api.github.com/users/arichiardi/following{/other_user}","gists_url":"https://api.github.com/users/arichiardi/gists{/gist_id}","starred_url":"https://api.github.com/users/arichiardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arichiardi/subscriptions","organizations_url":"https://api.github.com/users/arichiardi/orgs","repos_url":"https://api.github.com/users/arichiardi/repos","events_url":"https://api.github.com/users/arichiardi/events{/privacy}","received_events_url":"https://api.github.com/users/arichiardi/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T16:25:39Z","updated_at":"2016-09-20T16:25:39Z","body":"Hey Peter yes no problem ;)\r\n\r\nI am talking about handling messages on the server side. As we know, client code can be buggy / malicious code can come from the net / messages can get corrupted etc etc (exaggerating here a bit)\r\n\r\nThe use case: as a sente server, I would like to be able to understand why an event from the client is deemed as `bad-event`/`bad-package`.\r\n\r\nI stripped all the solutions away from this description. Also, keep in mind this is more for completeness and robustness as many servers might just discard the malformed events and you might rightly think that it is kind of useless to generate this info. I kind of maybe agree it is useless in production, but for benchmarking and integration tests it might be a life saver ;)\r\n\r\nThank you Peter!\r\n"}}
{"actor":{"display_login":"arichiardi"}}