{"action":"closed","number":269,"pull_request":{"url":"https://api.github.com/repos/onelogin/ruby-saml/pulls/269","id":46705074,"html_url":"https://github.com/onelogin/ruby-saml/pull/269","diff_url":"https://github.com/onelogin/ruby-saml/pull/269.diff","patch_url":"https://github.com/onelogin/ruby-saml/pull/269.patch","issue_url":"https://api.github.com/repos/onelogin/ruby-saml/issues/269","number":269,"state":"closed","locked":false,"title":"Refactor error handling; allow multiple error messages with soft","user":{"login":"vincentwoo","id":613320,"avatar_url":"https://avatars.githubusercontent.com/u/613320?v=3","gravatar_id":"","url":"https://api.github.com/users/vincentwoo","html_url":"https://github.com/vincentwoo","followers_url":"https://api.github.com/users/vincentwoo/followers","following_url":"https://api.github.com/users/vincentwoo/following{/other_user}","gists_url":"https://api.github.com/users/vincentwoo/gists{/gist_id}","starred_url":"https://api.github.com/users/vincentwoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincentwoo/subscriptions","organizations_url":"https://api.github.com/users/vincentwoo/orgs","repos_url":"https://api.github.com/users/vincentwoo/repos","events_url":"https://api.github.com/users/vincentwoo/events{/privacy}","received_events_url":"https://api.github.com/users/vincentwoo/received_events","type":"User","site_admin":false},"body":"When `soft` was introduced, it allowed business logic to examine failure without having to go through crazy `rescue` blocks. This was awesome.\r\n\r\nHowever, what was not awesome was that debugging invalid responses in prod was tedious - if your server just output the `errors` on an object, you'd only see the first error that tripped the validator. Most of the time, there are other screwups too. This change allows errors to accumulate on an object when safe mode is set. It also centralizes some very repeated error handling code.\r\n\r\nThere are unfortunately a couple of rough spots where assumptions baked into test order right now - like nil derefs that aren't checked in later tests. I had to hack around a couple.\r\n\r\nAlso, `Response`'s use of `doc.validate_document` was out of date - `options` is now the third parameter, but the options hash was being passed as the value for `soft`.","created_at":"2015-10-03T12:44:38Z","updated_at":"2016-04-29T15:42:02Z","closed_at":"2016-04-29T15:42:02Z","merged_at":"2016-04-29T15:42:01Z","merge_commit_sha":"20f97068b3f662e4796b645cbfcb14db13499637","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/onelogin/ruby-saml/pulls/269/commits","review_comments_url":"https://api.github.com/repos/onelogin/ruby-saml/pulls/269/comments","review_comment_url":"https://api.github.com/repos/onelogin/ruby-saml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/onelogin/ruby-saml/issues/269/comments","statuses_url":"https://api.github.com/repos/onelogin/ruby-saml/statuses/20f97068b3f662e4796b645cbfcb14db13499637","head":{"label":"vincentwoo:errors","ref":"errors","sha":"20f97068b3f662e4796b645cbfcb14db13499637","user":{"login":"vincentwoo","id":613320,"avatar_url":"https://avatars.githubusercontent.com/u/613320?v=3","gravatar_id":"","url":"https://api.github.com/users/vincentwoo","html_url":"https://github.com/vincentwoo","followers_url":"https://api.github.com/users/vincentwoo/followers","following_url":"https://api.github.com/users/vincentwoo/following{/other_user}","gists_url":"https://api.github.com/users/vincentwoo/gists{/gist_id}","starred_url":"https://api.github.com/users/vincentwoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincentwoo/subscriptions","organizations_url":"https://api.github.com/users/vincentwoo/orgs","repos_url":"https://api.github.com/users/vincentwoo/repos","events_url":"https://api.github.com/users/vincentwoo/events{/privacy}","received_events_url":"https://api.github.com/users/vincentwoo/received_events","type":"User","site_admin":false},"repo":{"id":43573412,"name":"ruby-saml","full_name":"vincentwoo/ruby-saml","owner":{"login":"vincentwoo","id":613320,"avatar_url":"https://avatars.githubusercontent.com/u/613320?v=3","gravatar_id":"","url":"https://api.github.com/users/vincentwoo","html_url":"https://github.com/vincentwoo","followers_url":"https://api.github.com/users/vincentwoo/followers","following_url":"https://api.github.com/users/vincentwoo/following{/other_user}","gists_url":"https://api.github.com/users/vincentwoo/gists{/gist_id}","starred_url":"https://api.github.com/users/vincentwoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincentwoo/subscriptions","organizations_url":"https://api.github.com/users/vincentwoo/orgs","repos_url":"https://api.github.com/users/vincentwoo/repos","events_url":"https://api.github.com/users/vincentwoo/events{/privacy}","received_events_url":"https://api.github.com/users/vincentwoo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vincentwoo/ruby-saml","description":"SAML SSO for Ruby","fork":true,"url":"https://api.github.com/repos/vincentwoo/ruby-saml","forks_url":"https://api.github.com/repos/vincentwoo/ruby-saml/forks","keys_url":"https://api.github.com/repos/vincentwoo/ruby-saml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vincentwoo/ruby-saml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vincentwoo/ruby-saml/teams","hooks_url":"https://api.github.com/repos/vincentwoo/ruby-saml/hooks","issue_events_url":"https://api.github.com/repos/vincentwoo/ruby-saml/issues/events{/number}","events_url":"https://api.github.com/repos/vincentwoo/ruby-saml/events","assignees_url":"https://api.github.com/repos/vincentwoo/ruby-saml/assignees{/user}","branches_url":"https://api.github.com/repos/vincentwoo/ruby-saml/branches{/branch}","tags_url":"https://api.github.com/repos/vincentwoo/ruby-saml/tags","blobs_url":"https://api.github.com/repos/vincentwoo/ruby-saml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vincentwoo/ruby-saml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vincentwoo/ruby-saml/git/refs{/sha}","trees_url":"https://api.github.com/repos/vincentwoo/ruby-saml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vincentwoo/ruby-saml/statuses/{sha}","languages_url":"https://api.github.com/repos/vincentwoo/ruby-saml/languages","stargazers_url":"https://api.github.com/repos/vincentwoo/ruby-saml/stargazers","contributors_url":"https://api.github.com/repos/vincentwoo/ruby-saml/contributors","subscribers_url":"https://api.github.com/repos/vincentwoo/ruby-saml/subscribers","subscription_url":"https://api.github.com/repos/vincentwoo/ruby-saml/subscription","commits_url":"https://api.github.com/repos/vincentwoo/ruby-saml/commits{/sha}","git_commits_url":"https://api.github.com/repos/vincentwoo/ruby-saml/git/commits{/sha}","comments_url":"https://api.github.com/repos/vincentwoo/ruby-saml/comments{/number}","issue_comment_url":"https://api.github.com/repos/vincentwoo/ruby-saml/issues/comments{/number}","contents_url":"https://api.github.com/repos/vincentwoo/ruby-saml/contents/{+path}","compare_url":"https://api.github.com/repos/vincentwoo/ruby-saml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vincentwoo/ruby-saml/merges","archive_url":"https://api.github.com/repos/vincentwoo/ruby-saml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vincentwoo/ruby-saml/downloads","issues_url":"https://api.github.com/repos/vincentwoo/ruby-saml/issues{/number}","pulls_url":"https://api.github.com/repos/vincentwoo/ruby-saml/pulls{/number}","milestones_url":"https://api.github.com/repos/vincentwoo/ruby-saml/milestones{/number}","notifications_url":"https://api.github.com/repos/vincentwoo/ruby-saml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vincentwoo/ruby-saml/labels{/name}","releases_url":"https://api.github.com/repos/vincentwoo/ruby-saml/releases{/id}","deployments_url":"https://api.github.com/repos/vincentwoo/ruby-saml/deployments","created_at":"2015-10-02T19:56:37Z","updated_at":"2016-03-29T01:11:42Z","pushed_at":"2016-04-13T22:23:59Z","git_url":"git://github.com/vincentwoo/ruby-saml.git","ssh_url":"git@github.com:vincentwoo/ruby-saml.git","clone_url":"https://github.com/vincentwoo/ruby-saml.git","svn_url":"https://github.com/vincentwoo/ruby-saml","homepage":"http://support.onelogin.com/entries/165434-saml-toolkit-for-ruby-on-rails","size":1438,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"onelogin:master","ref":"master","sha":"059abe4cfde3e4afbc703d6eadba7831fd6ea343","user":{"login":"onelogin","id":263373,"avatar_url":"https://avatars.githubusercontent.com/u/263373?v=3","gravatar_id":"","url":"https://api.github.com/users/onelogin","html_url":"https://github.com/onelogin","followers_url":"https://api.github.com/users/onelogin/followers","following_url":"https://api.github.com/users/onelogin/following{/other_user}","gists_url":"https://api.github.com/users/onelogin/gists{/gist_id}","starred_url":"https://api.github.com/users/onelogin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onelogin/subscriptions","organizations_url":"https://api.github.com/users/onelogin/orgs","repos_url":"https://api.github.com/users/onelogin/repos","events_url":"https://api.github.com/users/onelogin/events{/privacy}","received_events_url":"https://api.github.com/users/onelogin/received_events","type":"Organization","site_admin":false},"repo":{"id":644899,"name":"ruby-saml","full_name":"onelogin/ruby-saml","owner":{"login":"onelogin","id":263373,"avatar_url":"https://avatars.githubusercontent.com/u/263373?v=3","gravatar_id":"","url":"https://api.github.com/users/onelogin","html_url":"https://github.com/onelogin","followers_url":"https://api.github.com/users/onelogin/followers","following_url":"https://api.github.com/users/onelogin/following{/other_user}","gists_url":"https://api.github.com/users/onelogin/gists{/gist_id}","starred_url":"https://api.github.com/users/onelogin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onelogin/subscriptions","organizations_url":"https://api.github.com/users/onelogin/orgs","repos_url":"https://api.github.com/users/onelogin/repos","events_url":"https://api.github.com/users/onelogin/events{/privacy}","received_events_url":"https://api.github.com/users/onelogin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/onelogin/ruby-saml","description":"SAML SSO for Ruby","fork":false,"url":"https://api.github.com/repos/onelogin/ruby-saml","forks_url":"https://api.github.com/repos/onelogin/ruby-saml/forks","keys_url":"https://api.github.com/repos/onelogin/ruby-saml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/onelogin/ruby-saml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/onelogin/ruby-saml/teams","hooks_url":"https://api.github.com/repos/onelogin/ruby-saml/hooks","issue_events_url":"https://api.github.com/repos/onelogin/ruby-saml/issues/events{/number}","events_url":"https://api.github.com/repos/onelogin/ruby-saml/events","assignees_url":"https://api.github.com/repos/onelogin/ruby-saml/assignees{/user}","branches_url":"https://api.github.com/repos/onelogin/ruby-saml/branches{/branch}","tags_url":"https://api.github.com/repos/onelogin/ruby-saml/tags","blobs_url":"https://api.github.com/repos/onelogin/ruby-saml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/onelogin/ruby-saml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/onelogin/ruby-saml/git/refs{/sha}","trees_url":"https://api.github.com/repos/onelogin/ruby-saml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/onelogin/ruby-saml/statuses/{sha}","languages_url":"https://api.github.com/repos/onelogin/ruby-saml/languages","stargazers_url":"https://api.github.com/repos/onelogin/ruby-saml/stargazers","contributors_url":"https://api.github.com/repos/onelogin/ruby-saml/contributors","subscribers_url":"https://api.github.com/repos/onelogin/ruby-saml/subscribers","subscription_url":"https://api.github.com/repos/onelogin/ruby-saml/subscription","commits_url":"https://api.github.com/repos/onelogin/ruby-saml/commits{/sha}","git_commits_url":"https://api.github.com/repos/onelogin/ruby-saml/git/commits{/sha}","comments_url":"https://api.github.com/repos/onelogin/ruby-saml/comments{/number}","issue_comment_url":"https://api.github.com/repos/onelogin/ruby-saml/issues/comments{/number}","contents_url":"https://api.github.com/repos/onelogin/ruby-saml/contents/{+path}","compare_url":"https://api.github.com/repos/onelogin/ruby-saml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/onelogin/ruby-saml/merges","archive_url":"https://api.github.com/repos/onelogin/ruby-saml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/onelogin/ruby-saml/downloads","issues_url":"https://api.github.com/repos/onelogin/ruby-saml/issues{/number}","pulls_url":"https://api.github.com/repos/onelogin/ruby-saml/pulls{/number}","milestones_url":"https://api.github.com/repos/onelogin/ruby-saml/milestones{/number}","notifications_url":"https://api.github.com/repos/onelogin/ruby-saml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/onelogin/ruby-saml/labels{/name}","releases_url":"https://api.github.com/repos/onelogin/ruby-saml/releases{/id}","deployments_url":"https://api.github.com/repos/onelogin/ruby-saml/deployments","created_at":"2010-05-03T18:39:04Z","updated_at":"2016-04-26T21:09:12Z","pushed_at":"2016-04-29T15:42:00Z","git_url":"git://github.com/onelogin/ruby-saml.git","ssh_url":"git@github.com:onelogin/ruby-saml.git","clone_url":"https://github.com/onelogin/ruby-saml.git","svn_url":"https://github.com/onelogin/ruby-saml","homepage":"https://developers.onelogin.com/v1.0/page/saml-toolkit-for-ruby-on-rails","size":2591,"stargazers_count":407,"watchers_count":407,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":344,"mirror_url":null,"open_issues_count":9,"forks":344,"open_issues":9,"watchers":407,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/onelogin/ruby-saml/pulls/269"},"html":{"href":"https://github.com/onelogin/ruby-saml/pull/269"},"issue":{"href":"https://api.github.com/repos/onelogin/ruby-saml/issues/269"},"comments":{"href":"https://api.github.com/repos/onelogin/ruby-saml/issues/269/comments"},"review_comments":{"href":"https://api.github.com/repos/onelogin/ruby-saml/pulls/269/comments"},"review_comment":{"href":"https://api.github.com/repos/onelogin/ruby-saml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/onelogin/ruby-saml/pulls/269/commits"},"statuses":{"href":"https://api.github.com/repos/onelogin/ruby-saml/statuses/20f97068b3f662e4796b645cbfcb14db13499637"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"pitbulk","id":600897,"avatar_url":"https://avatars.githubusercontent.com/u/600897?v=3","gravatar_id":"","url":"https://api.github.com/users/pitbulk","html_url":"https://github.com/pitbulk","followers_url":"https://api.github.com/users/pitbulk/followers","following_url":"https://api.github.com/users/pitbulk/following{/other_user}","gists_url":"https://api.github.com/users/pitbulk/gists{/gist_id}","starred_url":"https://api.github.com/users/pitbulk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pitbulk/subscriptions","organizations_url":"https://api.github.com/users/pitbulk/orgs","repos_url":"https://api.github.com/users/pitbulk/repos","events_url":"https://api.github.com/users/pitbulk/events{/privacy}","received_events_url":"https://api.github.com/users/pitbulk/received_events","type":"User","site_admin":false},"comments":6,"review_comments":0,"commits":1,"additions":92,"deletions":112,"changed_files":6}}