{"action":"closed","number":107,"pull_request":{"url":"https://api.github.com/repos/moltin/js-sdk/pulls/107","id":139284900,"html_url":"https://github.com/moltin/js-sdk/pull/107","diff_url":"https://github.com/moltin/js-sdk/pull/107.diff","patch_url":"https://github.com/moltin/js-sdk/pull/107.patch","issue_url":"https://api.github.com/repos/moltin/js-sdk/issues/107","number":107,"state":"closed","locked":false,"title":"fix: Handle 204 empty API body on DELETE","user":{"login":"ynnoj","id":3578709,"avatar_url":"https://avatars1.githubusercontent.com/u/3578709?v=4","gravatar_id":"","url":"https://api.github.com/users/ynnoj","html_url":"https://github.com/ynnoj","followers_url":"https://api.github.com/users/ynnoj/followers","following_url":"https://api.github.com/users/ynnoj/following{/other_user}","gists_url":"https://api.github.com/users/ynnoj/gists{/gist_id}","starred_url":"https://api.github.com/users/ynnoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ynnoj/subscriptions","organizations_url":"https://api.github.com/users/ynnoj/orgs","repos_url":"https://api.github.com/users/ynnoj/repos","events_url":"https://api.github.com/users/ynnoj/events{/privacy}","received_events_url":"https://api.github.com/users/ynnoj/received_events","type":"User","site_admin":false},"body":"A `DELETE` request to the API now returns a `204` status with an empty body (as per the JSON API spec). The existing `parseJSON` function was failing as there was no JSON to parse, and the `fetch` library was throwing an exception.\r\n\r\nThe helper function now checks the status of the response, and resolves accordingly.","created_at":"2017-09-05T10:07:14Z","updated_at":"2017-09-05T10:16:06Z","closed_at":"2017-09-05T10:16:06Z","merged_at":"2017-09-05T10:16:06Z","merge_commit_sha":"6ebcb9985221a3dfc11fdf2b4ed6bae963167594","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/moltin/js-sdk/pulls/107/commits","review_comments_url":"https://api.github.com/repos/moltin/js-sdk/pulls/107/comments","review_comment_url":"https://api.github.com/repos/moltin/js-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/moltin/js-sdk/issues/107/comments","statuses_url":"https://api.github.com/repos/moltin/js-sdk/statuses/6544b32cddbd2d4a2c7c982b546a9e789d1255a8","head":{"label":"moltin:fix/handle-204-delete","ref":"fix/handle-204-delete","sha":"6544b32cddbd2d4a2c7c982b546a9e789d1255a8","user":{"login":"moltin","id":4078879,"avatar_url":"https://avatars3.githubusercontent.com/u/4078879?v=4","gravatar_id":"","url":"https://api.github.com/users/moltin","html_url":"https://github.com/moltin","followers_url":"https://api.github.com/users/moltin/followers","following_url":"https://api.github.com/users/moltin/following{/other_user}","gists_url":"https://api.github.com/users/moltin/gists{/gist_id}","starred_url":"https://api.github.com/users/moltin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moltin/subscriptions","organizations_url":"https://api.github.com/users/moltin/orgs","repos_url":"https://api.github.com/users/moltin/repos","events_url":"https://api.github.com/users/moltin/events{/privacy}","received_events_url":"https://api.github.com/users/moltin/received_events","type":"Organization","site_admin":false},"repo":{"id":20272016,"name":"js-sdk","full_name":"moltin/js-sdk","owner":{"login":"moltin","id":4078879,"avatar_url":"https://avatars3.githubusercontent.com/u/4078879?v=4","gravatar_id":"","url":"https://api.github.com/users/moltin","html_url":"https://github.com/moltin","followers_url":"https://api.github.com/users/moltin/followers","following_url":"https://api.github.com/users/moltin/following{/other_user}","gists_url":"https://api.github.com/users/moltin/gists{/gist_id}","starred_url":"https://api.github.com/users/moltin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moltin/subscriptions","organizations_url":"https://api.github.com/users/moltin/orgs","repos_url":"https://api.github.com/users/moltin/repos","events_url":"https://api.github.com/users/moltin/events{/privacy}","received_events_url":"https://api.github.com/users/moltin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/moltin/js-sdk","description":"JavaScript & Node.js SDKs for the Moltin eCommerce API","fork":false,"url":"https://api.github.com/repos/moltin/js-sdk","forks_url":"https://api.github.com/repos/moltin/js-sdk/forks","keys_url":"https://api.github.com/repos/moltin/js-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moltin/js-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moltin/js-sdk/teams","hooks_url":"https://api.github.com/repos/moltin/js-sdk/hooks","issue_events_url":"https://api.github.com/repos/moltin/js-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/moltin/js-sdk/events","assignees_url":"https://api.github.com/repos/moltin/js-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/moltin/js-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/moltin/js-sdk/tags","blobs_url":"https://api.github.com/repos/moltin/js-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moltin/js-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moltin/js-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/moltin/js-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moltin/js-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/moltin/js-sdk/languages","stargazers_url":"https://api.github.com/repos/moltin/js-sdk/stargazers","contributors_url":"https://api.github.com/repos/moltin/js-sdk/contributors","subscribers_url":"https://api.github.com/repos/moltin/js-sdk/subscribers","subscription_url":"https://api.github.com/repos/moltin/js-sdk/subscription","commits_url":"https://api.github.com/repos/moltin/js-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/moltin/js-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/moltin/js-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/moltin/js-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/moltin/js-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/moltin/js-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moltin/js-sdk/merges","archive_url":"https://api.github.com/repos/moltin/js-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moltin/js-sdk/downloads","issues_url":"https://api.github.com/repos/moltin/js-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/moltin/js-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/moltin/js-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/moltin/js-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moltin/js-sdk/labels{/name}","releases_url":"https://api.github.com/repos/moltin/js-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/moltin/js-sdk/deployments","created_at":"2014-05-28T20:49:28Z","updated_at":"2017-08-28T12:02:55Z","pushed_at":"2017-09-05T10:16:06Z","git_url":"git://github.com/moltin/js-sdk.git","ssh_url":"git@github.com:moltin/js-sdk.git","clone_url":"https://github.com/moltin/js-sdk.git","svn_url":"https://github.com/moltin/js-sdk","homepage":"","size":1264,"stargazers_count":83,"watchers_count":83,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":2,"forks":32,"open_issues":2,"watchers":83,"default_branch":"master"}},"base":{"label":"moltin:master","ref":"master","sha":"9df506a984409844da7cca9262402cd14c93c1bf","user":{"login":"moltin","id":4078879,"avatar_url":"https://avatars3.githubusercontent.com/u/4078879?v=4","gravatar_id":"","url":"https://api.github.com/users/moltin","html_url":"https://github.com/moltin","followers_url":"https://api.github.com/users/moltin/followers","following_url":"https://api.github.com/users/moltin/following{/other_user}","gists_url":"https://api.github.com/users/moltin/gists{/gist_id}","starred_url":"https://api.github.com/users/moltin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moltin/subscriptions","organizations_url":"https://api.github.com/users/moltin/orgs","repos_url":"https://api.github.com/users/moltin/repos","events_url":"https://api.github.com/users/moltin/events{/privacy}","received_events_url":"https://api.github.com/users/moltin/received_events","type":"Organization","site_admin":false},"repo":{"id":20272016,"name":"js-sdk","full_name":"moltin/js-sdk","owner":{"login":"moltin","id":4078879,"avatar_url":"https://avatars3.githubusercontent.com/u/4078879?v=4","gravatar_id":"","url":"https://api.github.com/users/moltin","html_url":"https://github.com/moltin","followers_url":"https://api.github.com/users/moltin/followers","following_url":"https://api.github.com/users/moltin/following{/other_user}","gists_url":"https://api.github.com/users/moltin/gists{/gist_id}","starred_url":"https://api.github.com/users/moltin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moltin/subscriptions","organizations_url":"https://api.github.com/users/moltin/orgs","repos_url":"https://api.github.com/users/moltin/repos","events_url":"https://api.github.com/users/moltin/events{/privacy}","received_events_url":"https://api.github.com/users/moltin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/moltin/js-sdk","description":"JavaScript & Node.js SDKs for the Moltin eCommerce API","fork":false,"url":"https://api.github.com/repos/moltin/js-sdk","forks_url":"https://api.github.com/repos/moltin/js-sdk/forks","keys_url":"https://api.github.com/repos/moltin/js-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moltin/js-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moltin/js-sdk/teams","hooks_url":"https://api.github.com/repos/moltin/js-sdk/hooks","issue_events_url":"https://api.github.com/repos/moltin/js-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/moltin/js-sdk/events","assignees_url":"https://api.github.com/repos/moltin/js-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/moltin/js-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/moltin/js-sdk/tags","blobs_url":"https://api.github.com/repos/moltin/js-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moltin/js-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moltin/js-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/moltin/js-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moltin/js-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/moltin/js-sdk/languages","stargazers_url":"https://api.github.com/repos/moltin/js-sdk/stargazers","contributors_url":"https://api.github.com/repos/moltin/js-sdk/contributors","subscribers_url":"https://api.github.com/repos/moltin/js-sdk/subscribers","subscription_url":"https://api.github.com/repos/moltin/js-sdk/subscription","commits_url":"https://api.github.com/repos/moltin/js-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/moltin/js-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/moltin/js-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/moltin/js-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/moltin/js-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/moltin/js-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moltin/js-sdk/merges","archive_url":"https://api.github.com/repos/moltin/js-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moltin/js-sdk/downloads","issues_url":"https://api.github.com/repos/moltin/js-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/moltin/js-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/moltin/js-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/moltin/js-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moltin/js-sdk/labels{/name}","releases_url":"https://api.github.com/repos/moltin/js-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/moltin/js-sdk/deployments","created_at":"2014-05-28T20:49:28Z","updated_at":"2017-08-28T12:02:55Z","pushed_at":"2017-09-05T10:16:06Z","git_url":"git://github.com/moltin/js-sdk.git","ssh_url":"git@github.com:moltin/js-sdk.git","clone_url":"https://github.com/moltin/js-sdk.git","svn_url":"https://github.com/moltin/js-sdk","homepage":"","size":1264,"stargazers_count":83,"watchers_count":83,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":2,"forks":32,"open_issues":2,"watchers":83,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/moltin/js-sdk/pulls/107"},"html":{"href":"https://github.com/moltin/js-sdk/pull/107"},"issue":{"href":"https://api.github.com/repos/moltin/js-sdk/issues/107"},"comments":{"href":"https://api.github.com/repos/moltin/js-sdk/issues/107/comments"},"review_comments":{"href":"https://api.github.com/repos/moltin/js-sdk/pulls/107/comments"},"review_comment":{"href":"https://api.github.com/repos/moltin/js-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/moltin/js-sdk/pulls/107/commits"},"statuses":{"href":"https://api.github.com/repos/moltin/js-sdk/statuses/6544b32cddbd2d4a2c7c982b546a9e789d1255a8"}},"author_association":"OWNER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"ynnoj","id":3578709,"avatar_url":"https://avatars1.githubusercontent.com/u/3578709?v=4","gravatar_id":"","url":"https://api.github.com/users/ynnoj","html_url":"https://github.com/ynnoj","followers_url":"https://api.github.com/users/ynnoj/followers","following_url":"https://api.github.com/users/ynnoj/following{/other_user}","gists_url":"https://api.github.com/users/ynnoj/gists{/gist_id}","starred_url":"https://api.github.com/users/ynnoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ynnoj/subscriptions","organizations_url":"https://api.github.com/users/ynnoj/orgs","repos_url":"https://api.github.com/users/ynnoj/repos","events_url":"https://api.github.com/users/ynnoj/events{/privacy}","received_events_url":"https://api.github.com/users/ynnoj/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":3,"additions":35,"deletions":37,"changed_files":7}}
{"actor":{"display_login":"ynnoj"}}