{"action":"created","issue":{"url":"https://api.github.com/repos/gorilla/securecookie/issues/9","labels_url":"https://api.github.com/repos/gorilla/securecookie/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/gorilla/securecookie/issues/9/comments","events_url":"https://api.github.com/repos/gorilla/securecookie/issues/9/events","html_url":"https://github.com/gorilla/securecookie/pull/9","id":36978680,"number":9,"title":"Expose more errors.","user":{"login":"fancycode","id":247730,"avatar_url":"https://avatars.githubusercontent.com/u/247730?v=3","gravatar_id":"","url":"https://api.github.com/users/fancycode","html_url":"https://github.com/fancycode","followers_url":"https://api.github.com/users/fancycode/followers","following_url":"https://api.github.com/users/fancycode/following{/other_user}","gists_url":"https://api.github.com/users/fancycode/gists{/gist_id}","starred_url":"https://api.github.com/users/fancycode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fancycode/subscriptions","organizations_url":"https://api.github.com/users/fancycode/orgs","repos_url":"https://api.github.com/users/fancycode/repos","events_url":"https://api.github.com/users/fancycode/events{/privacy}","received_events_url":"https://api.github.com/users/fancycode/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-07-02T12:52:44Z","updated_at":"2015-03-27T08:45:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gorilla/securecookie/pulls/9","html_url":"https://github.com/gorilla/securecookie/pull/9","diff_url":"https://github.com/gorilla/securecookie/pull/9.diff","patch_url":"https://github.com/gorilla/securecookie/pull/9.patch"},"body":"Decoding errors are now exposed as `Err...` variables so applications can check for them."},"comment":{"url":"https://api.github.com/repos/gorilla/securecookie/issues/comments/86870304","html_url":"https://github.com/gorilla/securecookie/pull/9#issuecomment-86870304","issue_url":"https://api.github.com/repos/gorilla/securecookie/issues/9","id":86870304,"user":{"login":"dchest","id":52677,"avatar_url":"https://avatars.githubusercontent.com/u/52677?v=3","gravatar_id":"","url":"https://api.github.com/users/dchest","html_url":"https://github.com/dchest","followers_url":"https://api.github.com/users/dchest/followers","following_url":"https://api.github.com/users/dchest/following{/other_user}","gists_url":"https://api.github.com/users/dchest/gists{/gist_id}","starred_url":"https://api.github.com/users/dchest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchest/subscriptions","organizations_url":"https://api.github.com/users/dchest/orgs","repos_url":"https://api.github.com/users/dchest/repos","events_url":"https://api.github.com/users/dchest/events{/privacy}","received_events_url":"https://api.github.com/users/dchest/received_events","type":"User","site_admin":false},"created_at":"2015-03-27T08:45:21Z","updated_at":"2015-03-27T08:45:21Z","body":"What is the rationale for the app to check this errors? Any error returned from Decode should be handled in exactly one way, there's no practical difference between `ErrMacInvalid` and `ErrInvalidTimestamp` — the cookie is malformed/malicious. From the app's point of view, maybe only `ErrCookieExpired` can be distinguished from any other failure and reported to user (but most apps just redirect to login page in this case)."}}