changeset 35734:b4e1d0654736

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.
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 18 Jan 2018 18:04:56 -0500
parents 3d48ae1aaa5e
children 693e3bcae19e
files hgext/lfs/blobstore.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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))