{"action":"created","comment":{"url":"https://api.github.com/repos/faunadb/faunadb-ruby/pulls/comments/50594466","id":50594466,"diff_hunk":"@@ -47,23 +43,8 @@ def self.raise_for_status_code(request_result)\n     #            :: A simple string as the message.\n     def initialize(request_result)\n       @request_result = request_result\n-\n-      errors = request_result.response_content\n-      if errors.is_a?(Hash)\n-        if errors.key?(:error)\n-          message = errors[:description] || errors[:error]\n-          @errors = [message]\n-        else\n-          errors = errors[:errors]\n-          message = errors.collect { |error| error[:code] }.join(',')\n-          @errors = errors\n-        end\n-      else\n-        message = errors\n-        @errors = nil\n-      end\n-\n-      super(message)\n+      @errors = request_result.response_content[:errors].map(&ErrorData.method(:from_hash))","path":"lib/fauna/errors.rb","position":49,"original_position":49,"commit_id":"316bd55990ebf34a6980a526fce00cad8067c5a9","original_commit_id":"316bd55990ebf34a6980a526fce00cad8067c5a9","user":{"login":"ashfire908","id":225779,"avatar_url":"https://avatars.githubusercontent.com/u/225779?v=3","gravatar_id":"","url":"https://api.github.com/users/ashfire908","html_url":"https://github.com/ashfire908","followers_url":"https://api.github.com/users/ashfire908/followers","following_url":"https://api.github.com/users/ashfire908/following{/other_user}","gists_url":"https://api.github.com/users/ashfire908/gists{/gist_id}","starred_url":"https://api.github.com/users/ashfire908/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashfire908/subscriptions","organizations_url":"https://api.github.com/users/ashfire908/orgs","repos_url":"https://api.github.com/users/ashfire908/repos","events_url":"https://api.github.com/users/ashfire908/events{/privacy}","received_events_url":"https://api.github.com/users/ashfire908/received_events","type":"User","site_admin":false},"body":"We assume for safety `errors` might not exist. If nothing else, we can expect this to happen when a load balancer or reverse proxy gives out.","created_at":"2016-01-22T21:40:55Z","updated_at":"2016-01-22T21:40:55Z","html_url":"https://github.com/faunadb/faunadb-ruby/pull/111#discussion_r50594466","pull_request_url":"https://api.github.com/repos/faunadb/faunadb-ruby/pulls/111","_links":{"self":{"href":"https://api.github.com/repos/faunadb/faunadb-ruby/pulls/comments/50594466"},"html":{"href":"https://github.com/faunadb/faunadb-ruby/pull/111#discussion_r50594466"},"pull_request":{"href":"https://api.github.com/repos/faunadb/faunadb-ruby/pulls/111"}}},"pull_request":{"url":"https://api.github.com/repos/faunadb/faunadb-ruby/pulls/111","id":55527114,"html_url":"https://github.com/faunadb/faunadb-ruby/pull/111","diff_url":"https://github.com/faunadb/faunadb-ruby/pull/111.diff","patch_url":"https://github.com/faunadb/faunadb-ruby/pull/111.patch","issue_url":"https://api.github.com/repos/faunadb/faunadb-ruby/issues/111","number":111,"state":"open","locked":false,"title":"Use formal error data structures","user":{"login":"andy-faunadb","id":13004842,"avatar_url":"https://avatars.githubusercontent.com/u/13004842?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-faunadb","html_url":"https://github.com/andy-faunadb","followers_url":"https://api.github.com/users/andy-faunadb/followers","following_url":"https://api.github.com/users/andy-faunadb/following{/other_user}","gists_url":"https://api.github.com/users/andy-faunadb/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-faunadb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-faunadb/subscriptions","organizations_url":"https://api.github.com/users/andy-faunadb/orgs","repos_url":"https://api.github.com/users/andy-faunadb/repos","events_url":"https://api.github.com/users/andy-faunadb/events{/privacy}","received_events_url":"https://api.github.com/users/andy-faunadb/received_events","type":"User","site_admin":false},"body":"Fixes #90.","created_at":"2016-01-09T00:12:51Z","updated_at":"2016-01-22T21:40:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"48893e1d1cb5141fa2c9bf3459967d636ed22dfb","assignee":{"login":"ashfire908","id":225779,"avatar_url":"https://avatars.githubusercontent.com/u/225779?v=3","gravatar_id":"","url":"https://api.github.com/users/ashfire908","html_url":"https://github.com/ashfire908","followers_url":"https://api.github.com/users/ashfire908/followers","following_url":"https://api.github.com/users/ashfire908/following{/other_user}","gists_url":"https://api.github.com/users/ashfire908/gists{/gist_id}","starred_url":"https://api.github.com/users/ashfire908/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashfire908/subscriptions","organizations_url":"https://api.github.com/users/ashfire908/orgs","repos_url":"https://api.github.com/users/ashfire908/repos","events_url":"https://api.github.com/users/ashfire908/events{/privacy}","received_events_url":"https://api.github.com/users/ashfire908/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/faunadb/faunadb-ruby/pulls/111/commits","review_comments_url":"https://api.github.com/repos/faunadb/faunadb-ruby/pulls/111/comments","review_comment_url":"https://api.github.com/repos/faunadb/faunadb-ruby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/faunadb/faunadb-ruby/issues/111/comments","statuses_url":"https://api.github.com/repos/faunadb/faunadb-ruby/statuses/316bd55990ebf34a6980a526fce00cad8067c5a9","head":{"label":"faunadb:errors","ref":"errors","sha":"316bd55990ebf34a6980a526fce00cad8067c5a9","user":{"login":"faunadb","id":1477000,"avatar_url":"https://avatars.githubusercontent.com/u/1477000?v=3","gravatar_id":"","url":"https://api.github.com/users/faunadb","html_url":"https://github.com/faunadb","followers_url":"https://api.github.com/users/faunadb/followers","following_url":"https://api.github.com/users/faunadb/following{/other_user}","gists_url":"https://api.github.com/users/faunadb/gists{/gist_id}","starred_url":"https://api.github.com/users/faunadb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faunadb/subscriptions","organizations_url":"https://api.github.com/users/faunadb/orgs","repos_url":"https://api.github.com/users/faunadb/repos","events_url":"https://api.github.com/users/faunadb/events{/privacy}","received_events_url":"https://api.github.com/users/faunadb/received_events","type":"Organization","site_admin":false},"repo":{"id":7089764,"name":"faunadb-ruby","full_name":"faunadb/faunadb-ruby","owner":{"login":"faunadb","id":1477000,"avatar_url":"https://avatars.githubusercontent.com/u/1477000?v=3","gravatar_id":"","url":"https://api.github.com/users/faunadb","html_url":"https://github.com/faunadb","followers_url":"https://api.github.com/users/faunadb/followers","following_url":"https://api.github.com/users/faunadb/following{/other_user}","gists_url":"https://api.github.com/users/faunadb/gists{/gist_id}","starred_url":"https://api.github.com/users/faunadb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faunadb/subscriptions","organizations_url":"https://api.github.com/users/faunadb/orgs","repos_url":"https://api.github.com/users/faunadb/repos","events_url":"https://api.github.com/users/faunadb/events{/privacy}","received_events_url":"https://api.github.com/users/faunadb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/faunadb/faunadb-ruby","description":"Ruby client for Fauna. Owner: Andrew","fork":false,"url":"https://api.github.com/repos/faunadb/faunadb-ruby","forks_url":"https://api.github.com/repos/faunadb/faunadb-ruby/forks","keys_url":"https://api.github.com/repos/faunadb/faunadb-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/faunadb/faunadb-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/faunadb/faunadb-ruby/teams","hooks_url":"https://api.github.com/repos/faunadb/faunadb-ruby/hooks","issue_events_url":"https://api.github.com/repos/faunadb/faunadb-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/faunadb/faunadb-ruby/events","assignees_url":"https://api.github.com/repos/faunadb/faunadb-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/faunadb/faunadb-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/faunadb/faunadb-ruby/tags","blobs_url":"https://api.github.com/repos/faunadb/faunadb-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/faunadb/faunadb-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/faunadb/faunadb-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/faunadb/faunadb-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/faunadb/faunadb-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/faunadb/faunadb-ruby/languages","stargazers_url":"https://api.github.com/repos/faunadb/faunadb-ruby/stargazers","contributors_url":"https://api.github.com/repos/faunadb/faunadb-ruby/contributors","subscribers_url":"https://api.github.com/repos/faunadb/faunadb-ruby/subscribers","subscription_url":"https://api.github.com/repos/faunadb/faunadb-ruby/subscription","commits_url":"https://api.github.com/repos/faunadb/faunadb-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/faunadb/faunadb-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/faunadb/faunadb-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/faunadb/faunadb-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/faunadb/faunadb-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/faunadb/faunadb-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/faunadb/faunadb-ruby/merges","archive_url":"https://api.github.com/repos/faunadb/faunadb-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/faunadb/faunadb-ruby/downloads","issues_url":"https://api.github.com/repos/faunadb/faunadb-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/faunadb/faunadb-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/faunadb/faunadb-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/faunadb/faunadb-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/faunadb/faunadb-ruby/labels{/name}","releases_url":"https://api.github.com/repos/faunadb/faunadb-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/faunadb/faunadb-ruby/deployments","created_at":"2012-12-10T08:15:38Z","updated_at":"2016-01-11T19:01:47Z","pushed_at":"2016-01-21T21:41:08Z","git_url":"git://github.com/faunadb/faunadb-ruby.git","ssh_url":"git@github.com:faunadb/faunadb-ruby.git","clone_url":"https://github.com/faunadb/faunadb-ruby.git","svn_url":"https://github.com/faunadb/faunadb-ruby","homepage":"https://faunadb.com","size":636,"stargazers_count":12,"watchers_count":12,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":8,"forks":11,"open_issues":8,"watchers":12,"default_branch":"master"}},"base":{"label":"faunadb:master","ref":"master","sha":"bc81acd695b9cb6f7003b34ccc61e9469d0c9da0","user":{"login":"faunadb","id":1477000,"avatar_url":"https://avatars.githubusercontent.com/u/1477000?v=3","gravatar_id":"","url":"https://api.github.com/users/faunadb","html_url":"https://github.com/faunadb","followers_url":"https://api.github.com/users/faunadb/followers","following_url":"https://api.github.com/users/faunadb/following{/other_user}","gists_url":"https://api.github.com/users/faunadb/gists{/gist_id}","starred_url":"https://api.github.com/users/faunadb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faunadb/subscriptions","organizations_url":"https://api.github.com/users/faunadb/orgs","repos_url":"https://api.github.com/users/faunadb/repos","events_url":"https://api.github.com/users/faunadb/events{/privacy}","received_events_url":"https://api.github.com/users/faunadb/received_events","type":"Organization","site_admin":false},"repo":{"id":7089764,"name":"faunadb-ruby","full_name":"faunadb/faunadb-ruby","owner":{"login":"faunadb","id":1477000,"avatar_url":"https://avatars.githubusercontent.com/u/1477000?v=3","gravatar_id":"","url":"https://api.github.com/users/faunadb","html_url":"https://github.com/faunadb","followers_url":"https://api.github.com/users/faunadb/followers","following_url":"https://api.github.com/users/faunadb/following{/other_user}","gists_url":"https://api.github.com/users/faunadb/gists{/gist_id}","starred_url":"https://api.github.com/users/faunadb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faunadb/subscriptions","organizations_url":"https://api.github.com/users/faunadb/orgs","repos_url":"https://api.github.com/users/faunadb/repos","events_url":"https://api.github.com/users/faunadb/events{/privacy}","received_events_url":"https://api.github.com/users/faunadb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/faunadb/faunadb-ruby","description":"Ruby client for Fauna. Owner: Andrew","fork":false,"url":"https://api.github.com/repos/faunadb/faunadb-ruby","forks_url":"https://api.github.com/repos/faunadb/faunadb-ruby/forks","keys_url":"https://api.github.com/repos/faunadb/faunadb-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/faunadb/faunadb-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/faunadb/faunadb-ruby/teams","hooks_url":"https://api.github.com/repos/faunadb/faunadb-ruby/hooks","issue_events_url":"https://api.github.com/repos/faunadb/faunadb-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/faunadb/faunadb-ruby/events","assignees_url":"https://api.github.com/repos/faunadb/faunadb-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/faunadb/faunadb-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/faunadb/faunadb-ruby/tags","blobs_url":"https://api.github.com/repos/faunadb/faunadb-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/faunadb/faunadb-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/faunadb/faunadb-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/faunadb/faunadb-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/faunadb/faunadb-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/faunadb/faunadb-ruby/languages","stargazers_url":"https://api.github.com/repos/faunadb/faunadb-ruby/stargazers","contributors_url":"https://api.github.com/repos/faunadb/faunadb-ruby/contributors","subscribers_url":"https://api.github.com/repos/faunadb/faunadb-ruby/subscribers","subscription_url":"https://api.github.com/repos/faunadb/faunadb-ruby/subscription","commits_url":"https://api.github.com/repos/faunadb/faunadb-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/faunadb/faunadb-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/faunadb/faunadb-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/faunadb/faunadb-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/faunadb/faunadb-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/faunadb/faunadb-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/faunadb/faunadb-ruby/merges","archive_url":"https://api.github.com/repos/faunadb/faunadb-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/faunadb/faunadb-ruby/downloads","issues_url":"https://api.github.com/repos/faunadb/faunadb-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/faunadb/faunadb-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/faunadb/faunadb-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/faunadb/faunadb-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/faunadb/faunadb-ruby/labels{/name}","releases_url":"https://api.github.com/repos/faunadb/faunadb-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/faunadb/faunadb-ruby/deployments","created_at":"2012-12-10T08:15:38Z","updated_at":"2016-01-11T19:01:47Z","pushed_at":"2016-01-21T21:41:08Z","git_url":"git://github.com/faunadb/faunadb-ruby.git","ssh_url":"git@github.com:faunadb/faunadb-ruby.git","clone_url":"https://github.com/faunadb/faunadb-ruby.git","svn_url":"https://github.com/faunadb/faunadb-ruby","homepage":"https://faunadb.com","size":636,"stargazers_count":12,"watchers_count":12,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":8,"forks":11,"open_issues":8,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/faunadb/faunadb-ruby/pulls/111"},"html":{"href":"https://github.com/faunadb/faunadb-ruby/pull/111"},"issue":{"href":"https://api.github.com/repos/faunadb/faunadb-ruby/issues/111"},"comments":{"href":"https://api.github.com/repos/faunadb/faunadb-ruby/issues/111/comments"},"review_comments":{"href":"https://api.github.com/repos/faunadb/faunadb-ruby/pulls/111/comments"},"review_comment":{"href":"https://api.github.com/repos/faunadb/faunadb-ruby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/faunadb/faunadb-ruby/pulls/111/commits"},"statuses":{"href":"https://api.github.com/repos/faunadb/faunadb-ruby/statuses/316bd55990ebf34a6980a526fce00cad8067c5a9"}}}}