{"action":"closed","number":127,"pull_request":{"url":"https://api.github.com/repos/chingor13/json_api_client/pulls/127","id":45836449,"html_url":"https://github.com/chingor13/json_api_client/pull/127","diff_url":"https://github.com/chingor13/json_api_client/pull/127.diff","patch_url":"https://github.com/chingor13/json_api_client/pull/127.patch","issue_url":"https://api.github.com/repos/chingor13/json_api_client/issues/127","number":127,"state":"closed","locked":false,"title":"allow null error attributes","user":{"login":"bcm","id":186480,"avatar_url":"https://avatars.githubusercontent.com/u/186480?v=3","gravatar_id":"","url":"https://api.github.com/users/bcm","html_url":"https://github.com/bcm","followers_url":"https://api.github.com/users/bcm/followers","following_url":"https://api.github.com/users/bcm/following{/other_user}","gists_url":"https://api.github.com/users/bcm/gists{/gist_id}","starred_url":"https://api.github.com/users/bcm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcm/subscriptions","organizations_url":"https://api.github.com/users/bcm/orgs","repos_url":"https://api.github.com/users/bcm/repos","events_url":"https://api.github.com/users/bcm/events{/privacy}","received_events_url":"https://api.github.com/users/bcm/received_events","type":"User","site_admin":false},"body":"some server implementations send null values for `source` etc. this results in corresponding `nil` values in the error `attrs` hash.\r\n\r\nunfortunately `fetch` does not return the default value when the hash value is `nil`. so when it returns `nil` for `source` we get the exception: `undefined method `fetch' for nil:NilClass` when trying to treat it as a hash.\r\n\r\nthe solution is to use `attrs[:source] || {}` instead of `attrs.fetch(:source, {})`. this is also necessary for a few other error attributes.","created_at":"2015-09-23T21:51:54Z","updated_at":"2015-10-13T16:07:13Z","closed_at":"2015-10-13T16:07:13Z","merged_at":null,"merge_commit_sha":"d4b3bb56c3c6e677f45ee2875d6bb8a3d09bc8e5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chingor13/json_api_client/pulls/127/commits","review_comments_url":"https://api.github.com/repos/chingor13/json_api_client/pulls/127/comments","review_comment_url":"https://api.github.com/repos/chingor13/json_api_client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chingor13/json_api_client/issues/127/comments","statuses_url":"https://api.github.com/repos/chingor13/json_api_client/statuses/2c60f88c22554621d449248b546ffd6e482c904a","head":{"label":"Hoodline:allow-null-error-attributes","ref":"allow-null-error-attributes","sha":"2c60f88c22554621d449248b546ffd6e482c904a","user":{"login":"Hoodline","id":4257929,"avatar_url":"https://avatars.githubusercontent.com/u/4257929?v=3","gravatar_id":"","url":"https://api.github.com/users/Hoodline","html_url":"https://github.com/Hoodline","followers_url":"https://api.github.com/users/Hoodline/followers","following_url":"https://api.github.com/users/Hoodline/following{/other_user}","gists_url":"https://api.github.com/users/Hoodline/gists{/gist_id}","starred_url":"https://api.github.com/users/Hoodline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hoodline/subscriptions","organizations_url":"https://api.github.com/users/Hoodline/orgs","repos_url":"https://api.github.com/users/Hoodline/repos","events_url":"https://api.github.com/users/Hoodline/events{/privacy}","received_events_url":"https://api.github.com/users/Hoodline/received_events","type":"Organization","site_admin":false},"repo":{"id":43021428,"name":"json_api_client","full_name":"Hoodline/json_api_client","owner":{"login":"Hoodline","id":4257929,"avatar_url":"https://avatars.githubusercontent.com/u/4257929?v=3","gravatar_id":"","url":"https://api.github.com/users/Hoodline","html_url":"https://github.com/Hoodline","followers_url":"https://api.github.com/users/Hoodline/followers","following_url":"https://api.github.com/users/Hoodline/following{/other_user}","gists_url":"https://api.github.com/users/Hoodline/gists{/gist_id}","starred_url":"https://api.github.com/users/Hoodline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hoodline/subscriptions","organizations_url":"https://api.github.com/users/Hoodline/orgs","repos_url":"https://api.github.com/users/Hoodline/repos","events_url":"https://api.github.com/users/Hoodline/events{/privacy}","received_events_url":"https://api.github.com/users/Hoodline/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Hoodline/json_api_client","description":"Build client libraries compliant with specification defined by jsonapi.org","fork":true,"url":"https://api.github.com/repos/Hoodline/json_api_client","forks_url":"https://api.github.com/repos/Hoodline/json_api_client/forks","keys_url":"https://api.github.com/repos/Hoodline/json_api_client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Hoodline/json_api_client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Hoodline/json_api_client/teams","hooks_url":"https://api.github.com/repos/Hoodline/json_api_client/hooks","issue_events_url":"https://api.github.com/repos/Hoodline/json_api_client/issues/events{/number}","events_url":"https://api.github.com/repos/Hoodline/json_api_client/events","assignees_url":"https://api.github.com/repos/Hoodline/json_api_client/assignees{/user}","branches_url":"https://api.github.com/repos/Hoodline/json_api_client/branches{/branch}","tags_url":"https://api.github.com/repos/Hoodline/json_api_client/tags","blobs_url":"https://api.github.com/repos/Hoodline/json_api_client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Hoodline/json_api_client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Hoodline/json_api_client/git/refs{/sha}","trees_url":"https://api.github.com/repos/Hoodline/json_api_client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Hoodline/json_api_client/statuses/{sha}","languages_url":"https://api.github.com/repos/Hoodline/json_api_client/languages","stargazers_url":"https://api.github.com/repos/Hoodline/json_api_client/stargazers","contributors_url":"https://api.github.com/repos/Hoodline/json_api_client/contributors","subscribers_url":"https://api.github.com/repos/Hoodline/json_api_client/subscribers","subscription_url":"https://api.github.com/repos/Hoodline/json_api_client/subscription","commits_url":"https://api.github.com/repos/Hoodline/json_api_client/commits{/sha}","git_commits_url":"https://api.github.com/repos/Hoodline/json_api_client/git/commits{/sha}","comments_url":"https://api.github.com/repos/Hoodline/json_api_client/comments{/number}","issue_comment_url":"https://api.github.com/repos/Hoodline/json_api_client/issues/comments{/number}","contents_url":"https://api.github.com/repos/Hoodline/json_api_client/contents/{+path}","compare_url":"https://api.github.com/repos/Hoodline/json_api_client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Hoodline/json_api_client/merges","archive_url":"https://api.github.com/repos/Hoodline/json_api_client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Hoodline/json_api_client/downloads","issues_url":"https://api.github.com/repos/Hoodline/json_api_client/issues{/number}","pulls_url":"https://api.github.com/repos/Hoodline/json_api_client/pulls{/number}","milestones_url":"https://api.github.com/repos/Hoodline/json_api_client/milestones{/number}","notifications_url":"https://api.github.com/repos/Hoodline/json_api_client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Hoodline/json_api_client/labels{/name}","releases_url":"https://api.github.com/repos/Hoodline/json_api_client/releases{/id}","created_at":"2015-09-23T19:13:10Z","updated_at":"2015-09-23T19:13:11Z","pushed_at":"2015-09-24T19:12:07Z","git_url":"git://github.com/Hoodline/json_api_client.git","ssh_url":"git@github.com:Hoodline/json_api_client.git","clone_url":"https://github.com/Hoodline/json_api_client.git","svn_url":"https://github.com/Hoodline/json_api_client","homepage":null,"size":461,"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":"chingor13:master","ref":"master","sha":"2074963cbda7ae0b8f9ce96f86662685ecf2d908","user":{"login":"chingor13","id":32483,"avatar_url":"https://avatars.githubusercontent.com/u/32483?v=3","gravatar_id":"","url":"https://api.github.com/users/chingor13","html_url":"https://github.com/chingor13","followers_url":"https://api.github.com/users/chingor13/followers","following_url":"https://api.github.com/users/chingor13/following{/other_user}","gists_url":"https://api.github.com/users/chingor13/gists{/gist_id}","starred_url":"https://api.github.com/users/chingor13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chingor13/subscriptions","organizations_url":"https://api.github.com/users/chingor13/orgs","repos_url":"https://api.github.com/users/chingor13/repos","events_url":"https://api.github.com/users/chingor13/events{/privacy}","received_events_url":"https://api.github.com/users/chingor13/received_events","type":"User","site_admin":false},"repo":{"id":13082779,"name":"json_api_client","full_name":"chingor13/json_api_client","owner":{"login":"chingor13","id":32483,"avatar_url":"https://avatars.githubusercontent.com/u/32483?v=3","gravatar_id":"","url":"https://api.github.com/users/chingor13","html_url":"https://github.com/chingor13","followers_url":"https://api.github.com/users/chingor13/followers","following_url":"https://api.github.com/users/chingor13/following{/other_user}","gists_url":"https://api.github.com/users/chingor13/gists{/gist_id}","starred_url":"https://api.github.com/users/chingor13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chingor13/subscriptions","organizations_url":"https://api.github.com/users/chingor13/orgs","repos_url":"https://api.github.com/users/chingor13/repos","events_url":"https://api.github.com/users/chingor13/events{/privacy}","received_events_url":"https://api.github.com/users/chingor13/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chingor13/json_api_client","description":"Build client libraries compliant with specification defined by jsonapi.org","fork":false,"url":"https://api.github.com/repos/chingor13/json_api_client","forks_url":"https://api.github.com/repos/chingor13/json_api_client/forks","keys_url":"https://api.github.com/repos/chingor13/json_api_client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chingor13/json_api_client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chingor13/json_api_client/teams","hooks_url":"https://api.github.com/repos/chingor13/json_api_client/hooks","issue_events_url":"https://api.github.com/repos/chingor13/json_api_client/issues/events{/number}","events_url":"https://api.github.com/repos/chingor13/json_api_client/events","assignees_url":"https://api.github.com/repos/chingor13/json_api_client/assignees{/user}","branches_url":"https://api.github.com/repos/chingor13/json_api_client/branches{/branch}","tags_url":"https://api.github.com/repos/chingor13/json_api_client/tags","blobs_url":"https://api.github.com/repos/chingor13/json_api_client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chingor13/json_api_client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chingor13/json_api_client/git/refs{/sha}","trees_url":"https://api.github.com/repos/chingor13/json_api_client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chingor13/json_api_client/statuses/{sha}","languages_url":"https://api.github.com/repos/chingor13/json_api_client/languages","stargazers_url":"https://api.github.com/repos/chingor13/json_api_client/stargazers","contributors_url":"https://api.github.com/repos/chingor13/json_api_client/contributors","subscribers_url":"https://api.github.com/repos/chingor13/json_api_client/subscribers","subscription_url":"https://api.github.com/repos/chingor13/json_api_client/subscription","commits_url":"https://api.github.com/repos/chingor13/json_api_client/commits{/sha}","git_commits_url":"https://api.github.com/repos/chingor13/json_api_client/git/commits{/sha}","comments_url":"https://api.github.com/repos/chingor13/json_api_client/comments{/number}","issue_comment_url":"https://api.github.com/repos/chingor13/json_api_client/issues/comments{/number}","contents_url":"https://api.github.com/repos/chingor13/json_api_client/contents/{+path}","compare_url":"https://api.github.com/repos/chingor13/json_api_client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chingor13/json_api_client/merges","archive_url":"https://api.github.com/repos/chingor13/json_api_client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chingor13/json_api_client/downloads","issues_url":"https://api.github.com/repos/chingor13/json_api_client/issues{/number}","pulls_url":"https://api.github.com/repos/chingor13/json_api_client/pulls{/number}","milestones_url":"https://api.github.com/repos/chingor13/json_api_client/milestones{/number}","notifications_url":"https://api.github.com/repos/chingor13/json_api_client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chingor13/json_api_client/labels{/name}","releases_url":"https://api.github.com/repos/chingor13/json_api_client/releases{/id}","created_at":"2013-09-25T03:04:52Z","updated_at":"2015-10-12T07:57:50Z","pushed_at":"2015-10-13T16:03:24Z","git_url":"git://github.com/chingor13/json_api_client.git","ssh_url":"git@github.com:chingor13/json_api_client.git","clone_url":"https://github.com/chingor13/json_api_client.git","svn_url":"https://github.com/chingor13/json_api_client","homepage":null,"size":1364,"stargazers_count":71,"watchers_count":71,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":13,"forks":34,"open_issues":13,"watchers":71,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chingor13/json_api_client/pulls/127"},"html":{"href":"https://github.com/chingor13/json_api_client/pull/127"},"issue":{"href":"https://api.github.com/repos/chingor13/json_api_client/issues/127"},"comments":{"href":"https://api.github.com/repos/chingor13/json_api_client/issues/127/comments"},"review_comments":{"href":"https://api.github.com/repos/chingor13/json_api_client/pulls/127/comments"},"review_comment":{"href":"https://api.github.com/repos/chingor13/json_api_client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chingor13/json_api_client/pulls/127/commits"},"statuses":{"href":"https://api.github.com/repos/chingor13/json_api_client/statuses/2c60f88c22554621d449248b546ffd6e482c904a"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":2,"review_comments":0,"commits":1,"additions":10,"deletions":6,"changed_files":2}}