{"action":"created","comment":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/comments/75892780","id":75892780,"diff_hunk":"@@ -61,22 +61,8 @@ class PetAPITests: XCTestCase {\n     \n     func test3DeletePet() {\n         let expectation = self.expectationWithDescription(\"testDeletePet\")\n-        PetAPI.deletePet(petId: 1000).always {\n-                // expectation.fulfill()\n-            }.always {\n-                // Noop for now\n-            }.error { errorType -> Void in\n-                // The server gives us no data back so alamofire parsing fails - at least\n-                // verify that is the error we get here\n-                // Error Domain=com.alamofire.error Code=-6006 \"JSON could not be serialized. Input data was nil or zero\n-                // length.\" UserInfo={NSLocalizedFailureReason=JSON could not be serialized. Input data was nil or zero\n-                // length.}\n-                let error = errorType as NSError\n-                if error.code == -6006 {\n-                    expectation.fulfill()\n-                } else {\n-                    XCTFail(\"error logging out\")\n-                }\n+        PetAPI.deletePet(petId: 1000).then {\n+            expectation.fulfill()","path":"samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift","position":21,"original_position":21,"commit_id":"e89f914e8b5468e0522fe4f2e70d69b134f0990f","original_commit_id":"e89f914e8b5468e0522fe4f2e70d69b134f0990f","user":{"login":"jaz-ah","id":13263369,"avatar_url":"https://avatars.githubusercontent.com/u/13263369?v=3","gravatar_id":"","url":"https://api.github.com/users/jaz-ah","html_url":"https://github.com/jaz-ah","followers_url":"https://api.github.com/users/jaz-ah/followers","following_url":"https://api.github.com/users/jaz-ah/following{/other_user}","gists_url":"https://api.github.com/users/jaz-ah/gists{/gist_id}","starred_url":"https://api.github.com/users/jaz-ah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaz-ah/subscriptions","organizations_url":"https://api.github.com/users/jaz-ah/orgs","repos_url":"https://api.github.com/users/jaz-ah/repos","events_url":"https://api.github.com/users/jaz-ah/events{/privacy}","received_events_url":"https://api.github.com/users/jaz-ah/received_events","type":"User","site_admin":false},"body":"do we still have to do some type of error checking here?","created_at":"2016-08-23T15:39:49Z","updated_at":"2016-08-23T15:39:49Z","html_url":"https://github.com/swagger-api/swagger-codegen/pull/3624#discussion_r75892780","pull_request_url":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/3624","_links":{"self":{"href":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/comments/75892780"},"html":{"href":"https://github.com/swagger-api/swagger-codegen/pull/3624#discussion_r75892780"},"pull_request":{"href":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/3624"}}},"pull_request":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/3624","id":82222269,"html_url":"https://github.com/swagger-api/swagger-codegen/pull/3624","diff_url":"https://github.com/swagger-api/swagger-codegen/pull/3624.diff","patch_url":"https://github.com/swagger-api/swagger-codegen/pull/3624.patch","issue_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3624","number":3624,"state":"open","locked":false,"title":"[Swift] Include HTTP status code and body data in response errors","user":{"login":"jgavris","id":178749,"avatar_url":"https://avatars.githubusercontent.com/u/178749?v=3","gravatar_id":"","url":"https://api.github.com/users/jgavris","html_url":"https://github.com/jgavris","followers_url":"https://api.github.com/users/jgavris/followers","following_url":"https://api.github.com/users/jgavris/following{/other_user}","gists_url":"https://api.github.com/users/jgavris/gists{/gist_id}","starred_url":"https://api.github.com/users/jgavris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgavris/subscriptions","organizations_url":"https://api.github.com/users/jgavris/orgs","repos_url":"https://api.github.com/users/jgavris/repos","events_url":"https://api.github.com/users/jgavris/events{/privacy}","received_events_url":"https://api.github.com/users/jgavris/received_events","type":"User","site_admin":false},"body":"This is useful when differentiating different error responses. Example:\r\n\r\nif let e = error {\r\n  switch e {\r\n    case ErrorResponse.Error(400, _, _): responseLabel.text = \"Unknown error\"\r\n    case ErrorResponse.Error(403, _, _): responseLabel.text = \"Not logged in\"\r\n    default: responseLabel.text = \"\\(e)\"\r\n  }\r\n}\r\n\r\nThe existing error is straight from Alamofire and only includes the HTTP\r\nstatus code in the body of the message (not broken out as a separate value).\r\nIt also does not include the response body, which may be useful.","created_at":"2016-08-22T16:31:35Z","updated_at":"2016-08-23T15:39:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"731d212c93adc2177ea7f5423b4ec522bf28baa3","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/milestones/13","html_url":"https://github.com/swagger-api/swagger-codegen/milestones/v2.2.2","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/milestones/13/labels","id":1928763,"number":13,"title":"v2.2.2","description":"","creator":{"login":"wing328","id":934260,"avatar_url":"https://avatars.githubusercontent.com/u/934260?v=3","gravatar_id":"","url":"https://api.github.com/users/wing328","html_url":"https://github.com/wing328","followers_url":"https://api.github.com/users/wing328/followers","following_url":"https://api.github.com/users/wing328/following{/other_user}","gists_url":"https://api.github.com/users/wing328/gists{/gist_id}","starred_url":"https://api.github.com/users/wing328/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wing328/subscriptions","organizations_url":"https://api.github.com/users/wing328/orgs","repos_url":"https://api.github.com/users/wing328/repos","events_url":"https://api.github.com/users/wing328/events{/privacy}","received_events_url":"https://api.github.com/users/wing328/received_events","type":"User","site_admin":false},"open_issues":209,"closed_issues":54,"state":"open","created_at":"2016-08-08T09:16:56Z","updated_at":"2016-08-23T09:24:56Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/3624/commits","review_comments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/3624/comments","review_comment_url":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3624/comments","statuses_url":"https://api.github.com/repos/swagger-api/swagger-codegen/statuses/e89f914e8b5468e0522fe4f2e70d69b134f0990f","head":{"label":"ButterflyNetwork:swift-better-errors","ref":"swift-better-errors","sha":"e89f914e8b5468e0522fe4f2e70d69b134f0990f","user":{"login":"ButterflyNetwork","id":651456,"avatar_url":"https://avatars.githubusercontent.com/u/651456?v=3","gravatar_id":"","url":"https://api.github.com/users/ButterflyNetwork","html_url":"https://github.com/ButterflyNetwork","followers_url":"https://api.github.com/users/ButterflyNetwork/followers","following_url":"https://api.github.com/users/ButterflyNetwork/following{/other_user}","gists_url":"https://api.github.com/users/ButterflyNetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/ButterflyNetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ButterflyNetwork/subscriptions","organizations_url":"https://api.github.com/users/ButterflyNetwork/orgs","repos_url":"https://api.github.com/users/ButterflyNetwork/repos","events_url":"https://api.github.com/users/ButterflyNetwork/events{/privacy}","received_events_url":"https://api.github.com/users/ButterflyNetwork/received_events","type":"Organization","site_admin":false},"repo":{"id":62240755,"name":"swagger-codegen","full_name":"ButterflyNetwork/swagger-codegen","owner":{"login":"ButterflyNetwork","id":651456,"avatar_url":"https://avatars.githubusercontent.com/u/651456?v=3","gravatar_id":"","url":"https://api.github.com/users/ButterflyNetwork","html_url":"https://github.com/ButterflyNetwork","followers_url":"https://api.github.com/users/ButterflyNetwork/followers","following_url":"https://api.github.com/users/ButterflyNetwork/following{/other_user}","gists_url":"https://api.github.com/users/ButterflyNetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/ButterflyNetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ButterflyNetwork/subscriptions","organizations_url":"https://api.github.com/users/ButterflyNetwork/orgs","repos_url":"https://api.github.com/users/ButterflyNetwork/repos","events_url":"https://api.github.com/users/ButterflyNetwork/events{/privacy}","received_events_url":"https://api.github.com/users/ButterflyNetwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ButterflyNetwork/swagger-codegen","description":"swagger-codegen contains a template-driven engine to generate client code in different languages by parsing your Swagger Resource Declaration.","fork":true,"url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen","forks_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/forks","keys_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/teams","hooks_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/hooks","issue_events_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/issues/events{/number}","events_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/events","assignees_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/assignees{/user}","branches_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/branches{/branch}","tags_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/tags","blobs_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/git/refs{/sha}","trees_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/statuses/{sha}","languages_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/languages","stargazers_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/stargazers","contributors_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/contributors","subscribers_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/subscribers","subscription_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/subscription","commits_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/commits{/sha}","git_commits_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/git/commits{/sha}","comments_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/comments{/number}","issue_comment_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/issues/comments{/number}","contents_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/contents/{+path}","compare_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/merges","archive_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/downloads","issues_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/issues{/number}","pulls_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/pulls{/number}","milestones_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/milestones{/number}","notifications_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/labels{/name}","releases_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/releases{/id}","deployments_url":"https://api.github.com/repos/ButterflyNetwork/swagger-codegen/deployments","created_at":"2016-06-29T16:22:11Z","updated_at":"2016-06-29T16:22:18Z","pushed_at":"2016-08-23T14:18:09Z","git_url":"git://github.com/ButterflyNetwork/swagger-codegen.git","ssh_url":"git@github.com:ButterflyNetwork/swagger-codegen.git","clone_url":"https://github.com/ButterflyNetwork/swagger-codegen.git","svn_url":"https://github.com/ButterflyNetwork/swagger-codegen","homepage":"http://swagger.io","size":37917,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"swagger-api:master","ref":"master","sha":"54fe7a731caec554d582b4b0a79defdc52751e05","user":{"login":"swagger-api","id":7658037,"avatar_url":"https://avatars.githubusercontent.com/u/7658037?v=3","gravatar_id":"","url":"https://api.github.com/users/swagger-api","html_url":"https://github.com/swagger-api","followers_url":"https://api.github.com/users/swagger-api/followers","following_url":"https://api.github.com/users/swagger-api/following{/other_user}","gists_url":"https://api.github.com/users/swagger-api/gists{/gist_id}","starred_url":"https://api.github.com/users/swagger-api/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swagger-api/subscriptions","organizations_url":"https://api.github.com/users/swagger-api/orgs","repos_url":"https://api.github.com/users/swagger-api/repos","events_url":"https://api.github.com/users/swagger-api/events{/privacy}","received_events_url":"https://api.github.com/users/swagger-api/received_events","type":"Organization","site_admin":false},"repo":{"id":2006876,"name":"swagger-codegen","full_name":"swagger-api/swagger-codegen","owner":{"login":"swagger-api","id":7658037,"avatar_url":"https://avatars.githubusercontent.com/u/7658037?v=3","gravatar_id":"","url":"https://api.github.com/users/swagger-api","html_url":"https://github.com/swagger-api","followers_url":"https://api.github.com/users/swagger-api/followers","following_url":"https://api.github.com/users/swagger-api/following{/other_user}","gists_url":"https://api.github.com/users/swagger-api/gists{/gist_id}","starred_url":"https://api.github.com/users/swagger-api/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swagger-api/subscriptions","organizations_url":"https://api.github.com/users/swagger-api/orgs","repos_url":"https://api.github.com/users/swagger-api/repos","events_url":"https://api.github.com/users/swagger-api/events{/privacy}","received_events_url":"https://api.github.com/users/swagger-api/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/swagger-api/swagger-codegen","description":"swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.","fork":false,"url":"https://api.github.com/repos/swagger-api/swagger-codegen","forks_url":"https://api.github.com/repos/swagger-api/swagger-codegen/forks","keys_url":"https://api.github.com/repos/swagger-api/swagger-codegen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swagger-api/swagger-codegen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swagger-api/swagger-codegen/teams","hooks_url":"https://api.github.com/repos/swagger-api/swagger-codegen/hooks","issue_events_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/events{/number}","events_url":"https://api.github.com/repos/swagger-api/swagger-codegen/events","assignees_url":"https://api.github.com/repos/swagger-api/swagger-codegen/assignees{/user}","branches_url":"https://api.github.com/repos/swagger-api/swagger-codegen/branches{/branch}","tags_url":"https://api.github.com/repos/swagger-api/swagger-codegen/tags","blobs_url":"https://api.github.com/repos/swagger-api/swagger-codegen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swagger-api/swagger-codegen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swagger-api/swagger-codegen/git/refs{/sha}","trees_url":"https://api.github.com/repos/swagger-api/swagger-codegen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swagger-api/swagger-codegen/statuses/{sha}","languages_url":"https://api.github.com/repos/swagger-api/swagger-codegen/languages","stargazers_url":"https://api.github.com/repos/swagger-api/swagger-codegen/stargazers","contributors_url":"https://api.github.com/repos/swagger-api/swagger-codegen/contributors","subscribers_url":"https://api.github.com/repos/swagger-api/swagger-codegen/subscribers","subscription_url":"https://api.github.com/repos/swagger-api/swagger-codegen/subscription","commits_url":"https://api.github.com/repos/swagger-api/swagger-codegen/commits{/sha}","git_commits_url":"https://api.github.com/repos/swagger-api/swagger-codegen/git/commits{/sha}","comments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/comments{/number}","issue_comment_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/comments{/number}","contents_url":"https://api.github.com/repos/swagger-api/swagger-codegen/contents/{+path}","compare_url":"https://api.github.com/repos/swagger-api/swagger-codegen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swagger-api/swagger-codegen/merges","archive_url":"https://api.github.com/repos/swagger-api/swagger-codegen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swagger-api/swagger-codegen/downloads","issues_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues{/number}","pulls_url":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls{/number}","milestones_url":"https://api.github.com/repos/swagger-api/swagger-codegen/milestones{/number}","notifications_url":"https://api.github.com/repos/swagger-api/swagger-codegen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/labels{/name}","releases_url":"https://api.github.com/repos/swagger-api/swagger-codegen/releases{/id}","deployments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/deployments","created_at":"2011-07-06T14:26:48Z","updated_at":"2016-08-23T13:16:08Z","pushed_at":"2016-08-23T14:18:10Z","git_url":"git://github.com/swagger-api/swagger-codegen.git","ssh_url":"git@github.com:swagger-api/swagger-codegen.git","clone_url":"https://github.com/swagger-api/swagger-codegen.git","svn_url":"https://github.com/swagger-api/swagger-codegen","homepage":"http://swagger.io","size":55784,"stargazers_count":2583,"watchers_count":2583,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1445,"mirror_url":null,"open_issues_count":453,"forks":1445,"open_issues":453,"watchers":2583,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/3624"},"html":{"href":"https://github.com/swagger-api/swagger-codegen/pull/3624"},"issue":{"href":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3624"},"comments":{"href":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3624/comments"},"review_comments":{"href":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/3624/comments"},"review_comment":{"href":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/3624/commits"},"statuses":{"href":"https://api.github.com/repos/swagger-api/swagger-codegen/statuses/e89f914e8b5468e0522fe4f2e70d69b134f0990f"}}}}
{"actor":{"display_login":"jaz-ah"}}