{"action":"opened","number":9,"pull_request":{"url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/pulls/9","id":58009569,"html_url":"https://github.com/overleaf/writelatex-git-bridge/pull/9","diff_url":"https://github.com/overleaf/writelatex-git-bridge/pull/9.diff","patch_url":"https://github.com/overleaf/writelatex-git-bridge/pull/9.patch","issue_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/issues/9","number":9,"state":"open","locked":false,"title":"Provide sensible error message for LargeObjectException","user":{"login":"meis","id":2230093,"avatar_url":"https://avatars.githubusercontent.com/u/2230093?v=3","gravatar_id":"","url":"https://api.github.com/users/meis","html_url":"https://github.com/meis","followers_url":"https://api.github.com/users/meis/followers","following_url":"https://api.github.com/users/meis/following{/other_user}","gists_url":"https://api.github.com/users/meis/gists{/gist_id}","starred_url":"https://api.github.com/users/meis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meis/subscriptions","organizations_url":"https://api.github.com/users/meis/orgs","repos_url":"https://api.github.com/users/meis/repos","events_url":"https://api.github.com/users/meis/events{/privacy}","received_events_url":"https://api.github.com/users/meis/received_events","type":"User","site_admin":false},"body":"### Description\r\n\r\nUsually, when a user pushes a heavy set of changes the expected error is a timeout from Overleaf API. But if a single file is too big to be processed (does not fit in memory) a `LargeObjectException` is thrown, leaving a stacktrace in `err.log` but returning a generic error to user:\r\n```\r\n$ git push overleaf master\r\nCounting objects: 1420, done.\r\nDelta compression using up to 8 threads.\r\nCompressing objects: 100% (834/834), done.\r\nWriting objects: 100% (1419/1419), 143.32 MiB | 9.72 MiB/s, done.\r\nTotal 1419 (delta 696), reused 1185 (delta 569)\r\nremote: Resolving deltas: 100% (696/696)\r\nremote: error: internal error\r\nremote: hint: There was an internal error with the Git server.\r\nremote: hint: Please contact Overleaf.\r\nTo https://git.overleaf.com/project\r\n! [remote rejected] master -> master (internal error)\r\nerror: failed to push some refs to 'https://git.overleaf.com/project'\r\n```\r\n\r\nThis PR includes a new type of exception with message and description that will be shown on the user's console when this happens.\r\n\r\n### Review\r\nAs usual, it's worth to review my wording. With the exception I'm adding the user will see this output:\r\n```\r\n$ git push\r\nCounting objects: 4, done.\r\nDelta compression using up to 4 threads.\r\nCompressing objects: 100% (3/3), done.\r\nWriting objects: 100% (4/4), 72.02 KiB | 0 bytes/s, done.\r\nTotal 4 (delta 0), reused 0 (delta 0)\r\nremote: error: file too big\r\nremote: hint: File 'test/output2.dat' is too big to be pushed.\r\nTo http://localhost:8000/243sdfmwq\r\n ! [remote rejected] master -> master (file too big)\r\nerror: failed to push some refs to 'http://localhost:8000/243sdfmwq'\r\n\r\n```\r\n\r\n### Risks and Mitigations\r\n\r\n- The file's max size is not defined. As I understand the original exception is thrown where we hit an `OutOfMemory` error and the limit may vary depending on the jvm config or the state of the server. Maybe we can come to a better wording to reflect this.\r\n- I'm not sure about adding a really big file to test cases just to test that. If you think it's worth it, we can do (I think we have a lot of more common behaviour not tested).\r\n\r\n### Manual Testing Checklist\r\n\r\n- [x] Create a repository and try to push a big file (64mb). Returns the expected error.\r\n- [x] We can still push small sized files.","created_at":"2016-02-02T16:16:00Z","updated_at":"2016-02-02T16:16:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"jdleesmiller","id":160829,"avatar_url":"https://avatars.githubusercontent.com/u/160829?v=3","gravatar_id":"","url":"https://api.github.com/users/jdleesmiller","html_url":"https://github.com/jdleesmiller","followers_url":"https://api.github.com/users/jdleesmiller/followers","following_url":"https://api.github.com/users/jdleesmiller/following{/other_user}","gists_url":"https://api.github.com/users/jdleesmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/jdleesmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdleesmiller/subscriptions","organizations_url":"https://api.github.com/users/jdleesmiller/orgs","repos_url":"https://api.github.com/users/jdleesmiller/repos","events_url":"https://api.github.com/users/jdleesmiller/events{/privacy}","received_events_url":"https://api.github.com/users/jdleesmiller/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/pulls/9/commits","review_comments_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/pulls/9/comments","review_comment_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/issues/9/comments","statuses_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/statuses/6e2f9ad5de9a51c85c0c45f1156b1fb78d15a5f9","head":{"label":"overleaf:file-too-big-exception","ref":"file-too-big-exception","sha":"6e2f9ad5de9a51c85c0c45f1156b1fb78d15a5f9","user":{"login":"overleaf","id":6359919,"avatar_url":"https://avatars.githubusercontent.com/u/6359919?v=3","gravatar_id":"","url":"https://api.github.com/users/overleaf","html_url":"https://github.com/overleaf","followers_url":"https://api.github.com/users/overleaf/followers","following_url":"https://api.github.com/users/overleaf/following{/other_user}","gists_url":"https://api.github.com/users/overleaf/gists{/gist_id}","starred_url":"https://api.github.com/users/overleaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/overleaf/subscriptions","organizations_url":"https://api.github.com/users/overleaf/orgs","repos_url":"https://api.github.com/users/overleaf/repos","events_url":"https://api.github.com/users/overleaf/events{/privacy}","received_events_url":"https://api.github.com/users/overleaf/received_events","type":"Organization","site_admin":false},"repo":{"id":28834984,"name":"writelatex-git-bridge","full_name":"overleaf/writelatex-git-bridge","owner":{"login":"overleaf","id":6359919,"avatar_url":"https://avatars.githubusercontent.com/u/6359919?v=3","gravatar_id":"","url":"https://api.github.com/users/overleaf","html_url":"https://github.com/overleaf","followers_url":"https://api.github.com/users/overleaf/followers","following_url":"https://api.github.com/users/overleaf/following{/other_user}","gists_url":"https://api.github.com/users/overleaf/gists{/gist_id}","starred_url":"https://api.github.com/users/overleaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/overleaf/subscriptions","organizations_url":"https://api.github.com/users/overleaf/orgs","repos_url":"https://api.github.com/users/overleaf/repos","events_url":"https://api.github.com/users/overleaf/events{/privacy}","received_events_url":"https://api.github.com/users/overleaf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/overleaf/writelatex-git-bridge","description":"Bridge between WriteLatex and Git.","fork":true,"url":"https://api.github.com/repos/overleaf/writelatex-git-bridge","forks_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/forks","keys_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/teams","hooks_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/hooks","issue_events_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/issues/events{/number}","events_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/events","assignees_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/assignees{/user}","branches_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/branches{/branch}","tags_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/tags","blobs_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/git/refs{/sha}","trees_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/statuses/{sha}","languages_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/languages","stargazers_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/stargazers","contributors_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/contributors","subscribers_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/subscribers","subscription_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/subscription","commits_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/commits{/sha}","git_commits_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/git/commits{/sha}","comments_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/comments{/number}","issue_comment_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/issues/comments{/number}","contents_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/contents/{+path}","compare_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/merges","archive_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/downloads","issues_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/issues{/number}","pulls_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/pulls{/number}","milestones_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/milestones{/number}","notifications_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/labels{/name}","releases_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/releases{/id}","deployments_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/deployments","created_at":"2015-01-05T22:29:08Z","updated_at":"2016-01-20T08:23:23Z","pushed_at":"2016-02-02T16:16:01Z","git_url":"git://github.com/overleaf/writelatex-git-bridge.git","ssh_url":"git@github.com:overleaf/writelatex-git-bridge.git","clone_url":"https://github.com/overleaf/writelatex-git-bridge.git","svn_url":"https://github.com/overleaf/writelatex-git-bridge","homepage":"","size":14867,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"overleaf:master","ref":"master","sha":"2cb8ef18e047b1175bd65f3fbd663fb9cefe3ffe","user":{"login":"overleaf","id":6359919,"avatar_url":"https://avatars.githubusercontent.com/u/6359919?v=3","gravatar_id":"","url":"https://api.github.com/users/overleaf","html_url":"https://github.com/overleaf","followers_url":"https://api.github.com/users/overleaf/followers","following_url":"https://api.github.com/users/overleaf/following{/other_user}","gists_url":"https://api.github.com/users/overleaf/gists{/gist_id}","starred_url":"https://api.github.com/users/overleaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/overleaf/subscriptions","organizations_url":"https://api.github.com/users/overleaf/orgs","repos_url":"https://api.github.com/users/overleaf/repos","events_url":"https://api.github.com/users/overleaf/events{/privacy}","received_events_url":"https://api.github.com/users/overleaf/received_events","type":"Organization","site_admin":false},"repo":{"id":28834984,"name":"writelatex-git-bridge","full_name":"overleaf/writelatex-git-bridge","owner":{"login":"overleaf","id":6359919,"avatar_url":"https://avatars.githubusercontent.com/u/6359919?v=3","gravatar_id":"","url":"https://api.github.com/users/overleaf","html_url":"https://github.com/overleaf","followers_url":"https://api.github.com/users/overleaf/followers","following_url":"https://api.github.com/users/overleaf/following{/other_user}","gists_url":"https://api.github.com/users/overleaf/gists{/gist_id}","starred_url":"https://api.github.com/users/overleaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/overleaf/subscriptions","organizations_url":"https://api.github.com/users/overleaf/orgs","repos_url":"https://api.github.com/users/overleaf/repos","events_url":"https://api.github.com/users/overleaf/events{/privacy}","received_events_url":"https://api.github.com/users/overleaf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/overleaf/writelatex-git-bridge","description":"Bridge between WriteLatex and Git.","fork":true,"url":"https://api.github.com/repos/overleaf/writelatex-git-bridge","forks_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/forks","keys_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/teams","hooks_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/hooks","issue_events_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/issues/events{/number}","events_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/events","assignees_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/assignees{/user}","branches_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/branches{/branch}","tags_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/tags","blobs_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/git/refs{/sha}","trees_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/statuses/{sha}","languages_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/languages","stargazers_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/stargazers","contributors_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/contributors","subscribers_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/subscribers","subscription_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/subscription","commits_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/commits{/sha}","git_commits_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/git/commits{/sha}","comments_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/comments{/number}","issue_comment_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/issues/comments{/number}","contents_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/contents/{+path}","compare_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/merges","archive_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/downloads","issues_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/issues{/number}","pulls_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/pulls{/number}","milestones_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/milestones{/number}","notifications_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/labels{/name}","releases_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/releases{/id}","deployments_url":"https://api.github.com/repos/overleaf/writelatex-git-bridge/deployments","created_at":"2015-01-05T22:29:08Z","updated_at":"2016-01-20T08:23:23Z","pushed_at":"2016-02-02T16:16:01Z","git_url":"git://github.com/overleaf/writelatex-git-bridge.git","ssh_url":"git@github.com:overleaf/writelatex-git-bridge.git","clone_url":"https://github.com/overleaf/writelatex-git-bridge.git","svn_url":"https://github.com/overleaf/writelatex-git-bridge","homepage":"","size":14867,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/overleaf/writelatex-git-bridge/pulls/9"},"html":{"href":"https://github.com/overleaf/writelatex-git-bridge/pull/9"},"issue":{"href":"https://api.github.com/repos/overleaf/writelatex-git-bridge/issues/9"},"comments":{"href":"https://api.github.com/repos/overleaf/writelatex-git-bridge/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/overleaf/writelatex-git-bridge/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/overleaf/writelatex-git-bridge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/overleaf/writelatex-git-bridge/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/overleaf/writelatex-git-bridge/statuses/6e2f9ad5de9a51c85c0c45f1156b1fb78d15a5f9"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":56,"deletions":7,"changed_files":5}}