lfs: dump the full response on httperror in debug mode
authorMatt Harbison <matt_harbison@yahoo.com>
Thu, 18 Jan 2018 18:04:56 -0500
changeset 35734 b4e1d0654736
parent 35733 3d48ae1aaa5e
child 35735 693e3bcae19e
lfs: dump the full response on httperror in debug mode This was immensely helpful in diagnosing the 500: Internal Server Error when using workers to upload. It's a nasty wall of html, so we really can't do anything else with it.
hgext/lfs/blobstore.py
--- a/hgext/lfs/blobstore.py	Thu Jan 18 15:59:21 2018 -0500
+++ b/hgext/lfs/blobstore.py	Thu Jan 18 18:04:56 2018 -0500
@@ -312,6 +312,8 @@
                 if response:
                     self.ui.debug('lfs %s response: %s' % (action, response))
         except util.urlerr.httperror as ex:
+            if self.ui.debugflag:
+                self.ui.debug('%s: %s' % (oid, ex.read()))
             raise LfsRemoteError(_('HTTP error: %s (oid=%s, action=%s)')
                                  % (ex, oid, action))