{"action":"created","comment":{"url":"https://api.github.com/repos/OpenHumans/open-humans-api/pulls/comments/172058377","pull_request_review_id":101014074,"id":172058377,"diff_hunk":"@@ -143,6 +155,13 @@ def upload_file(target_filepath, metadata, access_token, project_member_id,\n                       files={'data_file': open(target_filepath, 'rb')},\n                       data={'project_member_id': project_member_id,\n                             'metadata': json.dumps(metadata)})\n+    if (r.status_code != 200 and\n+        r.status_code != 201 and\n+        r.status_code != 202):","path":"ohapi/api.py","position":null,"original_position":41,"commit_id":"a705cdf3516aa5d7bd6401ca6979455cbe34a3ca","original_commit_id":"b35e462d6fe50bdd9bdfc7e663683f2f2a7aadbd","user":{"login":"dibyadas","id":21265801,"avatar_url":"https://avatars3.githubusercontent.com/u/21265801?v=4","gravatar_id":"","url":"https://api.github.com/users/dibyadas","html_url":"https://github.com/dibyadas","followers_url":"https://api.github.com/users/dibyadas/followers","following_url":"https://api.github.com/users/dibyadas/following{/other_user}","gists_url":"https://api.github.com/users/dibyadas/gists{/gist_id}","starred_url":"https://api.github.com/users/dibyadas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dibyadas/subscriptions","organizations_url":"https://api.github.com/users/dibyadas/orgs","repos_url":"https://api.github.com/users/dibyadas/repos","events_url":"https://api.github.com/users/dibyadas/events{/privacy}","received_events_url":"https://api.github.com/users/dibyadas/received_events","type":"User","site_admin":false},"body":"Same here","created_at":"2018-03-04T18:13:48Z","updated_at":"2018-03-04T18:13:49Z","html_url":"https://github.com/OpenHumans/open-humans-api/pull/30#discussion_r172058377","pull_request_url":"https://api.github.com/repos/OpenHumans/open-humans-api/pulls/30","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/OpenHumans/open-humans-api/pulls/comments/172058377"},"html":{"href":"https://github.com/OpenHumans/open-humans-api/pull/30#discussion_r172058377"},"pull_request":{"href":"https://api.github.com/repos/OpenHumans/open-humans-api/pulls/30"}},"in_reply_to_id":172032515},"pull_request":{"url":"https://api.github.com/repos/OpenHumans/open-humans-api/pulls/30","id":172667953,"html_url":"https://github.com/OpenHumans/open-humans-api/pull/30","diff_url":"https://github.com/OpenHumans/open-humans-api/pull/30.diff","patch_url":"https://github.com/OpenHumans/open-humans-api/pull/30.patch","issue_url":"https://api.github.com/repos/OpenHumans/open-humans-api/issues/30","number":30,"state":"open","locked":false,"title":"Made API errors clear","user":{"login":"kritisingh1","id":22004158,"avatar_url":"https://avatars2.githubusercontent.com/u/22004158?v=4","gravatar_id":"","url":"https://api.github.com/users/kritisingh1","html_url":"https://github.com/kritisingh1","followers_url":"https://api.github.com/users/kritisingh1/followers","following_url":"https://api.github.com/users/kritisingh1/following{/other_user}","gists_url":"https://api.github.com/users/kritisingh1/gists{/gist_id}","starred_url":"https://api.github.com/users/kritisingh1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kritisingh1/subscriptions","organizations_url":"https://api.github.com/users/kritisingh1/orgs","repos_url":"https://api.github.com/users/kritisingh1/repos","events_url":"https://api.github.com/users/kritisingh1/events{/privacy}","received_events_url":"https://api.github.com/users/kritisingh1/received_events","type":"User","site_admin":false},"body":"<!--- Provide a general summary of your changes in the Title above -->\r\nCloses #16\r\n\r\n## General Checkups\r\n- [x] Have you checked that there aren't other open pull requests for the same issue/update/change?\r\n- [ ] If your code includes new features and not just bug fixes/copy editing: Did you include new tests?\r\n\r\n<!---\r\nby the way: if you want to discuss feature requests and bugs with us before submitting anything on GitHub: We're always happy to chat on Slack: http://slackin.openhumans.org/\r\n -->\r\n\r\n## Description\r\n<!--- Describe your changes in detail -->\r\nAPI errors raise exception based on their returning status codes. \r\n\r\n## Related Issue\r\n<!--- if this closes an issue make sure include e.g., \"fix #4\"\r\nor similar - or if just relates to an issue make sure to mention\r\nit like \"#4\" -->\r\n\r\n## Example\r\n<!--- if introducing a new feature or changing behavior of existing\r\nmethods/functions, include an example if possible to do in brief form -->\r\n\r\n<!--- Did you remember to include tests? Unless you're just changing\r\ngrammar, please include new tests for your change -->\r\n","created_at":"2018-03-03T13:45:37Z","updated_at":"2018-03-04T18:13:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bc5a7946a86d2ca3d21d32be674d7bd402ab591a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/OpenHumans/open-humans-api/pulls/30/commits","review_comments_url":"https://api.github.com/repos/OpenHumans/open-humans-api/pulls/30/comments","review_comment_url":"https://api.github.com/repos/OpenHumans/open-humans-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenHumans/open-humans-api/issues/30/comments","statuses_url":"https://api.github.com/repos/OpenHumans/open-humans-api/statuses/a705cdf3516aa5d7bd6401ca6979455cbe34a3ca","head":{"label":"kritisingh1:API-errors","ref":"API-errors","sha":"a705cdf3516aa5d7bd6401ca6979455cbe34a3ca","user":{"login":"kritisingh1","id":22004158,"avatar_url":"https://avatars2.githubusercontent.com/u/22004158?v=4","gravatar_id":"","url":"https://api.github.com/users/kritisingh1","html_url":"https://github.com/kritisingh1","followers_url":"https://api.github.com/users/kritisingh1/followers","following_url":"https://api.github.com/users/kritisingh1/following{/other_user}","gists_url":"https://api.github.com/users/kritisingh1/gists{/gist_id}","starred_url":"https://api.github.com/users/kritisingh1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kritisingh1/subscriptions","organizations_url":"https://api.github.com/users/kritisingh1/orgs","repos_url":"https://api.github.com/users/kritisingh1/repos","events_url":"https://api.github.com/users/kritisingh1/events{/privacy}","received_events_url":"https://api.github.com/users/kritisingh1/received_events","type":"User","site_admin":false},"repo":{"id":122904035,"name":"open-humans-api","full_name":"kritisingh1/open-humans-api","owner":{"login":"kritisingh1","id":22004158,"avatar_url":"https://avatars2.githubusercontent.com/u/22004158?v=4","gravatar_id":"","url":"https://api.github.com/users/kritisingh1","html_url":"https://github.com/kritisingh1","followers_url":"https://api.github.com/users/kritisingh1/followers","following_url":"https://api.github.com/users/kritisingh1/following{/other_user}","gists_url":"https://api.github.com/users/kritisingh1/gists{/gist_id}","starred_url":"https://api.github.com/users/kritisingh1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kritisingh1/subscriptions","organizations_url":"https://api.github.com/users/kritisingh1/orgs","repos_url":"https://api.github.com/users/kritisingh1/repos","events_url":"https://api.github.com/users/kritisingh1/events{/privacy}","received_events_url":"https://api.github.com/users/kritisingh1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kritisingh1/open-humans-api","description":"Tools to work with our APIs.","fork":true,"url":"https://api.github.com/repos/kritisingh1/open-humans-api","forks_url":"https://api.github.com/repos/kritisingh1/open-humans-api/forks","keys_url":"https://api.github.com/repos/kritisingh1/open-humans-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kritisingh1/open-humans-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kritisingh1/open-humans-api/teams","hooks_url":"https://api.github.com/repos/kritisingh1/open-humans-api/hooks","issue_events_url":"https://api.github.com/repos/kritisingh1/open-humans-api/issues/events{/number}","events_url":"https://api.github.com/repos/kritisingh1/open-humans-api/events","assignees_url":"https://api.github.com/repos/kritisingh1/open-humans-api/assignees{/user}","branches_url":"https://api.github.com/repos/kritisingh1/open-humans-api/branches{/branch}","tags_url":"https://api.github.com/repos/kritisingh1/open-humans-api/tags","blobs_url":"https://api.github.com/repos/kritisingh1/open-humans-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kritisingh1/open-humans-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kritisingh1/open-humans-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/kritisingh1/open-humans-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kritisingh1/open-humans-api/statuses/{sha}","languages_url":"https://api.github.com/repos/kritisingh1/open-humans-api/languages","stargazers_url":"https://api.github.com/repos/kritisingh1/open-humans-api/stargazers","contributors_url":"https://api.github.com/repos/kritisingh1/open-humans-api/contributors","subscribers_url":"https://api.github.com/repos/kritisingh1/open-humans-api/subscribers","subscription_url":"https://api.github.com/repos/kritisingh1/open-humans-api/subscription","commits_url":"https://api.github.com/repos/kritisingh1/open-humans-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/kritisingh1/open-humans-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/kritisingh1/open-humans-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/kritisingh1/open-humans-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/kritisingh1/open-humans-api/contents/{+path}","compare_url":"https://api.github.com/repos/kritisingh1/open-humans-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kritisingh1/open-humans-api/merges","archive_url":"https://api.github.com/repos/kritisingh1/open-humans-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kritisingh1/open-humans-api/downloads","issues_url":"https://api.github.com/repos/kritisingh1/open-humans-api/issues{/number}","pulls_url":"https://api.github.com/repos/kritisingh1/open-humans-api/pulls{/number}","milestones_url":"https://api.github.com/repos/kritisingh1/open-humans-api/milestones{/number}","notifications_url":"https://api.github.com/repos/kritisingh1/open-humans-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kritisingh1/open-humans-api/labels{/name}","releases_url":"https://api.github.com/repos/kritisingh1/open-humans-api/releases{/id}","deployments_url":"https://api.github.com/repos/kritisingh1/open-humans-api/deployments","created_at":"2018-02-26T02:53:00Z","updated_at":"2018-02-26T02:53:02Z","pushed_at":"2018-03-04T06:17:10Z","git_url":"git://github.com/kritisingh1/open-humans-api.git","ssh_url":"git@github.com:kritisingh1/open-humans-api.git","clone_url":"https://github.com/kritisingh1/open-humans-api.git","svn_url":"https://github.com/kritisingh1/open-humans-api","homepage":null,"size":59,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"OpenHumans:master","ref":"master","sha":"5fd533d300b8799d33db0133b1b6ab12c85d628e","user":{"login":"OpenHumans","id":3341265,"avatar_url":"https://avatars3.githubusercontent.com/u/3341265?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenHumans","html_url":"https://github.com/OpenHumans","followers_url":"https://api.github.com/users/OpenHumans/followers","following_url":"https://api.github.com/users/OpenHumans/following{/other_user}","gists_url":"https://api.github.com/users/OpenHumans/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenHumans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenHumans/subscriptions","organizations_url":"https://api.github.com/users/OpenHumans/orgs","repos_url":"https://api.github.com/users/OpenHumans/repos","events_url":"https://api.github.com/users/OpenHumans/events{/privacy}","received_events_url":"https://api.github.com/users/OpenHumans/received_events","type":"Organization","site_admin":false},"repo":{"id":65763791,"name":"open-humans-api","full_name":"OpenHumans/open-humans-api","owner":{"login":"OpenHumans","id":3341265,"avatar_url":"https://avatars3.githubusercontent.com/u/3341265?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenHumans","html_url":"https://github.com/OpenHumans","followers_url":"https://api.github.com/users/OpenHumans/followers","following_url":"https://api.github.com/users/OpenHumans/following{/other_user}","gists_url":"https://api.github.com/users/OpenHumans/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenHumans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenHumans/subscriptions","organizations_url":"https://api.github.com/users/OpenHumans/orgs","repos_url":"https://api.github.com/users/OpenHumans/repos","events_url":"https://api.github.com/users/OpenHumans/events{/privacy}","received_events_url":"https://api.github.com/users/OpenHumans/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenHumans/open-humans-api","description":"Tools to work with our APIs.","fork":false,"url":"https://api.github.com/repos/OpenHumans/open-humans-api","forks_url":"https://api.github.com/repos/OpenHumans/open-humans-api/forks","keys_url":"https://api.github.com/repos/OpenHumans/open-humans-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenHumans/open-humans-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenHumans/open-humans-api/teams","hooks_url":"https://api.github.com/repos/OpenHumans/open-humans-api/hooks","issue_events_url":"https://api.github.com/repos/OpenHumans/open-humans-api/issues/events{/number}","events_url":"https://api.github.com/repos/OpenHumans/open-humans-api/events","assignees_url":"https://api.github.com/repos/OpenHumans/open-humans-api/assignees{/user}","branches_url":"https://api.github.com/repos/OpenHumans/open-humans-api/branches{/branch}","tags_url":"https://api.github.com/repos/OpenHumans/open-humans-api/tags","blobs_url":"https://api.github.com/repos/OpenHumans/open-humans-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenHumans/open-humans-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenHumans/open-humans-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenHumans/open-humans-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenHumans/open-humans-api/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenHumans/open-humans-api/languages","stargazers_url":"https://api.github.com/repos/OpenHumans/open-humans-api/stargazers","contributors_url":"https://api.github.com/repos/OpenHumans/open-humans-api/contributors","subscribers_url":"https://api.github.com/repos/OpenHumans/open-humans-api/subscribers","subscription_url":"https://api.github.com/repos/OpenHumans/open-humans-api/subscription","commits_url":"https://api.github.com/repos/OpenHumans/open-humans-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenHumans/open-humans-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenHumans/open-humans-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenHumans/open-humans-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenHumans/open-humans-api/contents/{+path}","compare_url":"https://api.github.com/repos/OpenHumans/open-humans-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenHumans/open-humans-api/merges","archive_url":"https://api.github.com/repos/OpenHumans/open-humans-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenHumans/open-humans-api/downloads","issues_url":"https://api.github.com/repos/OpenHumans/open-humans-api/issues{/number}","pulls_url":"https://api.github.com/repos/OpenHumans/open-humans-api/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenHumans/open-humans-api/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenHumans/open-humans-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenHumans/open-humans-api/labels{/name}","releases_url":"https://api.github.com/repos/OpenHumans/open-humans-api/releases{/id}","deployments_url":"https://api.github.com/repos/OpenHumans/open-humans-api/deployments","created_at":"2016-08-15T20:44:53Z","updated_at":"2018-03-02T16:00:46Z","pushed_at":"2018-03-04T06:17:11Z","git_url":"git://github.com/OpenHumans/open-humans-api.git","ssh_url":"git@github.com:OpenHumans/open-humans-api.git","clone_url":"https://github.com/OpenHumans/open-humans-api.git","svn_url":"https://github.com/OpenHumans/open-humans-api","homepage":null,"size":47,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":9,"open_issues":12,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenHumans/open-humans-api/pulls/30"},"html":{"href":"https://github.com/OpenHumans/open-humans-api/pull/30"},"issue":{"href":"https://api.github.com/repos/OpenHumans/open-humans-api/issues/30"},"comments":{"href":"https://api.github.com/repos/OpenHumans/open-humans-api/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenHumans/open-humans-api/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenHumans/open-humans-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenHumans/open-humans-api/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/OpenHumans/open-humans-api/statuses/a705cdf3516aa5d7bd6401ca6979455cbe34a3ca"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dibyadas"}}