{"action":"created","issue":{"url":"https://api.github.com/repos/github/git-lfs/issues/1356","repository_url":"https://api.github.com/repos/github/git-lfs","labels_url":"https://api.github.com/repos/github/git-lfs/issues/1356/labels{/name}","comments_url":"https://api.github.com/repos/github/git-lfs/issues/1356/comments","events_url":"https://api.github.com/repos/github/git-lfs/issues/1356/events","html_url":"https://github.com/github/git-lfs/issues/1356","id":164482959,"number":1356,"title":"Git LFS Client displays the error twice","user":{"login":"bbain","id":16752579,"avatar_url":"https://avatars.githubusercontent.com/u/16752579?v=3","gravatar_id":"","url":"https://api.github.com/users/bbain","html_url":"https://github.com/bbain","followers_url":"https://api.github.com/users/bbain/followers","following_url":"https://api.github.com/users/bbain/following{/other_user}","gists_url":"https://api.github.com/users/bbain/gists{/gist_id}","starred_url":"https://api.github.com/users/bbain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbain/subscriptions","organizations_url":"https://api.github.com/users/bbain/orgs","repos_url":"https://api.github.com/users/bbain/repos","events_url":"https://api.github.com/users/bbain/events{/privacy}","received_events_url":"https://api.github.com/users/bbain/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/github/git-lfs/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-08T08:31:14Z","updated_at":"2016-07-08T15:25:49Z","closed_at":null,"body":"# Description\r\n\r\nThe Git LFS client is displaying an error message returned from the server twice:\r\n\r\n\r\n```\r\n$ git push\r\nGit LFS: (0 of 1 files) 0 B / 1024.00 KB                                                                                                                                                                                      \r\nGit LFS is not enabled for this repository.\r\nGit LFS is not enabled for this repository.\r\nerror: failed to push some refs to '....'\r\n```\r\n\r\nWe send the message back in a `{'message': 'Git LFS is not enabled for this repository.'}` blob as per the [spec](https://github.com/github/git-lfs/blob/master/docs/api/v1/http-v1-batch.md#response-errors) but the client outputs the same message twice\r\n\r\n# Trace\r\n     $ GIT_CURL_VERBOSE=1 GIT_TRACE=1 git push \r\n```\r\n> POST /lfs/blank.git/info/lfs/objects/batch HTTP/1.1\r\n> Host: dev.bitbucket.org:8002\r\n> Accept: application/vnd.git-lfs+json; charset=utf-8\r\n> Authorization: Basic * * * * *\r\n> Content-Type: application/vnd.git-lfs+json; charset=utf-8\r\n> User-Agent: git-lfs/1.2.1 (GitHub; darwin amd64; go 1.6.2)\r\n> \r\n{\"objects\":[{\"oid\":\"b7d1c06077551c176524aaea76e493e541011c8e00c8bbe2ed2f2b950d4bb117\",\"size\":1048576}],\"operation\":\"upload\"}trace git-lfs: HTTP: 501\r\n\r\n< HTTP/1.1 501 LFS Not Implemented\r\n< Connection: close\r\n< Transfer-Encoding: chunked\r\n< Content-Type: application/vnd.git-lfs+json\r\n< Date: Fri, 08 Jul 2016 08:14:55 GMT\r\n< Server: gunicorn/19.2.1\r\n< X-Usage-Input-Ops: 0\r\n< X-Usage-Output-Ops: 0\r\n< X-Usage-System-Time: 0.005585\r\n< X-Usage-User-Time: 0.043241\r\n< \r\ntrace git-lfs: HTTP: {\"message\": \"Git LFS is not enabled for this repository.}\r\n{\"message\": \"Git LFS is not enabled for this repository.}trace git-lfs: HTTP: \r\ntrace git-lfs: api error: Git LFS is not enabled for this repository.\r\nGit LFS: (0 of 1 files) 0 B / 1024.00 KB                                                                                                                                                                                      \r\nGit LFS is not enabled for this repository. \r\nGit LFS is not enabled for this repository.\r\nerror: failed to push some refs to 'http://bbain@dev.bitbucket.org:8002/lfs/blank.git'\r\n```\r\n\r\n# Cause\r\n\r\nI don't know any GO but I think the problem lays on https://github.com/github/git-lfs/blob/master/commands/uploader.go#L146-L149. It appears that the err has an inner that duplicates the message in err.\r\n\r\n# Environment\r\n* git version 2.9.0\r\n* git-lfs/1.2.1 (GitHub; darwin amd64; go 1.6.2) ... I also tried against master and it is still broken."},"comment":{"url":"https://api.github.com/repos/github/git-lfs/issues/comments/231389848","html_url":"https://github.com/github/git-lfs/issues/1356#issuecomment-231389848","issue_url":"https://api.github.com/repos/github/git-lfs/issues/1356","id":231389848,"user":{"login":"technoweenie","id":21,"avatar_url":"https://avatars.githubusercontent.com/u/21?v=3","gravatar_id":"","url":"https://api.github.com/users/technoweenie","html_url":"https://github.com/technoweenie","followers_url":"https://api.github.com/users/technoweenie/followers","following_url":"https://api.github.com/users/technoweenie/following{/other_user}","gists_url":"https://api.github.com/users/technoweenie/gists{/gist_id}","starred_url":"https://api.github.com/users/technoweenie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/technoweenie/subscriptions","organizations_url":"https://api.github.com/users/technoweenie/orgs","repos_url":"https://api.github.com/users/technoweenie/repos","events_url":"https://api.github.com/users/technoweenie/events{/privacy}","received_events_url":"https://api.github.com/users/technoweenie/received_events","type":"User","site_admin":true},"created_at":"2016-07-08T15:25:48Z","updated_at":"2016-07-08T15:25:48Z","body":"Thanks for the bug report!"}}
{"actor":{"display_login":"technoweenie"}}