{"action":"created","comment":{"url":"https://api.github.com/repos/edx/ecommerce/pulls/comments/87251147","pull_request_review_id":7871136,"id":87251147,"diff_hunk":"@@ -99,8 +99,11 @@ def create_order_model(self, user, basket, shipping_address, shipping_method, sh\n             order_data['status'] = status\n         if extra_order_fields:\n             order_data.update(extra_order_fields)\n-        order = Order(**order_data)\n-        order.save()\n+        try:\n+            order = Order(**order_data)\n+            order.save()\n+        except Exception:  # pylint: disable=broad-except\n+            logger.exception('Failed to save Order [%s]', order_number)","path":"ecommerce/extensions/order/utils.py","position":10,"original_position":10,"commit_id":"5d0dd1d20ac2568828a2c8acda2ff5f097da68a4","original_commit_id":"5d0dd1d20ac2568828a2c8acda2ff5f097da68a4","user":{"login":"rlucioni","id":969289,"avatar_url":"https://avatars.githubusercontent.com/u/969289?v=3","gravatar_id":"","url":"https://api.github.com/users/rlucioni","html_url":"https://github.com/rlucioni","followers_url":"https://api.github.com/users/rlucioni/followers","following_url":"https://api.github.com/users/rlucioni/following{/other_user}","gists_url":"https://api.github.com/users/rlucioni/gists{/gist_id}","starred_url":"https://api.github.com/users/rlucioni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlucioni/subscriptions","organizations_url":"https://api.github.com/users/rlucioni/orgs","repos_url":"https://api.github.com/users/rlucioni/repos","events_url":"https://api.github.com/users/rlucioni/events{/privacy}","received_events_url":"https://api.github.com/users/rlucioni/received_events","type":"User","site_admin":false},"body":"Is the goal of this work simply to log something when orders fail to save? If that's the case, to @clintonb's point, this PR seems unnecessary. It only makes sense if we want this method to proceed in spite of the order being unsaved.","created_at":"2016-11-09T18:38:45Z","updated_at":"2016-11-09T18:38:45Z","html_url":"https://github.com/edx/ecommerce/pull/1005#discussion_r87251147","pull_request_url":"https://api.github.com/repos/edx/ecommerce/pulls/1005","_links":{"self":{"href":"https://api.github.com/repos/edx/ecommerce/pulls/comments/87251147"},"html":{"href":"https://github.com/edx/ecommerce/pull/1005#discussion_r87251147"},"pull_request":{"href":"https://api.github.com/repos/edx/ecommerce/pulls/1005"}}},"pull_request":{"url":"https://api.github.com/repos/edx/ecommerce/pulls/1005","id":92940298,"html_url":"https://github.com/edx/ecommerce/pull/1005","diff_url":"https://github.com/edx/ecommerce/pull/1005.diff","patch_url":"https://github.com/edx/ecommerce/pull/1005.patch","issue_url":"https://api.github.com/repos/edx/ecommerce/issues/1005","number":1005,"state":"open","locked":false,"title":"ECOM-6217 Added logs and try catch on order creation","user":{"login":"Ayub-Khan","id":7721119,"avatar_url":"https://avatars.githubusercontent.com/u/7721119?v=3","gravatar_id":"","url":"https://api.github.com/users/Ayub-Khan","html_url":"https://github.com/Ayub-Khan","followers_url":"https://api.github.com/users/Ayub-Khan/followers","following_url":"https://api.github.com/users/Ayub-Khan/following{/other_user}","gists_url":"https://api.github.com/users/Ayub-Khan/gists{/gist_id}","starred_url":"https://api.github.com/users/Ayub-Khan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ayub-Khan/subscriptions","organizations_url":"https://api.github.com/users/Ayub-Khan/orgs","repos_url":"https://api.github.com/users/Ayub-Khan/repos","events_url":"https://api.github.com/users/Ayub-Khan/events{/privacy}","received_events_url":"https://api.github.com/users/Ayub-Khan/received_events","type":"User","site_admin":false},"body":"ECOM-6217\r\n\r\n**Description :**\r\nAdded try catch around the order.save and logged exception to check if it faces any exception on order.save and cause Missing Order issue. \r\n\r\n**Reviewers :** \r\n- [ ]  @noraiz-anwar \r\n- [ ]  @Qubad786 \r\n","created_at":"2016-11-09T10:44:59Z","updated_at":"2016-11-09T18:38:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f18cd388844e3920b6df2191acb58f768cdd4f33","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/edx/ecommerce/pulls/1005/commits","review_comments_url":"https://api.github.com/repos/edx/ecommerce/pulls/1005/comments","review_comment_url":"https://api.github.com/repos/edx/ecommerce/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/ecommerce/issues/1005/comments","statuses_url":"https://api.github.com/repos/edx/ecommerce/statuses/5d0dd1d20ac2568828a2c8acda2ff5f097da68a4","head":{"label":"edx:ECOM-6217","ref":"ECOM-6217","sha":"5d0dd1d20ac2568828a2c8acda2ff5f097da68a4","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":30175039,"name":"ecommerce","full_name":"edx/ecommerce","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/ecommerce","description":"Django application used to manage edX's product catalog and handle orders for those products.","fork":false,"url":"https://api.github.com/repos/edx/ecommerce","forks_url":"https://api.github.com/repos/edx/ecommerce/forks","keys_url":"https://api.github.com/repos/edx/ecommerce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/ecommerce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/ecommerce/teams","hooks_url":"https://api.github.com/repos/edx/ecommerce/hooks","issue_events_url":"https://api.github.com/repos/edx/ecommerce/issues/events{/number}","events_url":"https://api.github.com/repos/edx/ecommerce/events","assignees_url":"https://api.github.com/repos/edx/ecommerce/assignees{/user}","branches_url":"https://api.github.com/repos/edx/ecommerce/branches{/branch}","tags_url":"https://api.github.com/repos/edx/ecommerce/tags","blobs_url":"https://api.github.com/repos/edx/ecommerce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/ecommerce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/ecommerce/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/ecommerce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/ecommerce/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/ecommerce/languages","stargazers_url":"https://api.github.com/repos/edx/ecommerce/stargazers","contributors_url":"https://api.github.com/repos/edx/ecommerce/contributors","subscribers_url":"https://api.github.com/repos/edx/ecommerce/subscribers","subscription_url":"https://api.github.com/repos/edx/ecommerce/subscription","commits_url":"https://api.github.com/repos/edx/ecommerce/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/ecommerce/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/ecommerce/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/ecommerce/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/ecommerce/contents/{+path}","compare_url":"https://api.github.com/repos/edx/ecommerce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/ecommerce/merges","archive_url":"https://api.github.com/repos/edx/ecommerce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/ecommerce/downloads","issues_url":"https://api.github.com/repos/edx/ecommerce/issues{/number}","pulls_url":"https://api.github.com/repos/edx/ecommerce/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/ecommerce/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/ecommerce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/ecommerce/labels{/name}","releases_url":"https://api.github.com/repos/edx/ecommerce/releases{/id}","deployments_url":"https://api.github.com/repos/edx/ecommerce/deployments","created_at":"2015-02-02T06:55:15Z","updated_at":"2016-11-07T02:58:26Z","pushed_at":"2016-11-09T18:05:42Z","git_url":"git://github.com/edx/ecommerce.git","ssh_url":"git@github.com:edx/ecommerce.git","clone_url":"https://github.com/edx/ecommerce.git","svn_url":"https://github.com/edx/ecommerce","homepage":"","size":13139,"stargazers_count":42,"watchers_count":42,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":43,"mirror_url":null,"open_issues_count":19,"forks":43,"open_issues":19,"watchers":42,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"ed74dd2b753ec7dcb0dbfc309712483df91ea05f","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":30175039,"name":"ecommerce","full_name":"edx/ecommerce","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/ecommerce","description":"Django application used to manage edX's product catalog and handle orders for those products.","fork":false,"url":"https://api.github.com/repos/edx/ecommerce","forks_url":"https://api.github.com/repos/edx/ecommerce/forks","keys_url":"https://api.github.com/repos/edx/ecommerce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/ecommerce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/ecommerce/teams","hooks_url":"https://api.github.com/repos/edx/ecommerce/hooks","issue_events_url":"https://api.github.com/repos/edx/ecommerce/issues/events{/number}","events_url":"https://api.github.com/repos/edx/ecommerce/events","assignees_url":"https://api.github.com/repos/edx/ecommerce/assignees{/user}","branches_url":"https://api.github.com/repos/edx/ecommerce/branches{/branch}","tags_url":"https://api.github.com/repos/edx/ecommerce/tags","blobs_url":"https://api.github.com/repos/edx/ecommerce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/ecommerce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/ecommerce/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/ecommerce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/ecommerce/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/ecommerce/languages","stargazers_url":"https://api.github.com/repos/edx/ecommerce/stargazers","contributors_url":"https://api.github.com/repos/edx/ecommerce/contributors","subscribers_url":"https://api.github.com/repos/edx/ecommerce/subscribers","subscription_url":"https://api.github.com/repos/edx/ecommerce/subscription","commits_url":"https://api.github.com/repos/edx/ecommerce/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/ecommerce/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/ecommerce/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/ecommerce/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/ecommerce/contents/{+path}","compare_url":"https://api.github.com/repos/edx/ecommerce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/ecommerce/merges","archive_url":"https://api.github.com/repos/edx/ecommerce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/ecommerce/downloads","issues_url":"https://api.github.com/repos/edx/ecommerce/issues{/number}","pulls_url":"https://api.github.com/repos/edx/ecommerce/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/ecommerce/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/ecommerce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/ecommerce/labels{/name}","releases_url":"https://api.github.com/repos/edx/ecommerce/releases{/id}","deployments_url":"https://api.github.com/repos/edx/ecommerce/deployments","created_at":"2015-02-02T06:55:15Z","updated_at":"2016-11-07T02:58:26Z","pushed_at":"2016-11-09T18:05:42Z","git_url":"git://github.com/edx/ecommerce.git","ssh_url":"git@github.com:edx/ecommerce.git","clone_url":"https://github.com/edx/ecommerce.git","svn_url":"https://github.com/edx/ecommerce","homepage":"","size":13139,"stargazers_count":42,"watchers_count":42,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":43,"mirror_url":null,"open_issues_count":19,"forks":43,"open_issues":19,"watchers":42,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/ecommerce/pulls/1005"},"html":{"href":"https://github.com/edx/ecommerce/pull/1005"},"issue":{"href":"https://api.github.com/repos/edx/ecommerce/issues/1005"},"comments":{"href":"https://api.github.com/repos/edx/ecommerce/issues/1005/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/ecommerce/pulls/1005/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/ecommerce/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/ecommerce/pulls/1005/commits"},"statuses":{"href":"https://api.github.com/repos/edx/ecommerce/statuses/5d0dd1d20ac2568828a2c8acda2ff5f097da68a4"}}}}
{"actor":{"display_login":"rlucioni"}}