hgext/lfs/blobstore.py
changeset 40660 9f78d10742af
parent 40659 8863f08c1630
child 40661 380f5131ee7b
--- a/hgext/lfs/blobstore.py	Thu Nov 15 17:55:01 2018 -0500
+++ b/hgext/lfs/blobstore.py	Thu Nov 15 17:58:59 2018 -0500
@@ -271,9 +271,14 @@
             rsp = self.urlopener.open(batchreq)
             rawjson = rsp.read()
         except util.urlerr.httperror as ex:
-            raise LfsRemoteError(_('LFS HTTP error: %s') % ex,
-                                 hint=_('api=%s, action=%s')
-                                 % (url, action))
+            hints = {
+                400: _('check that lfs serving is enabled on %s and "%s" is '
+                       'supported') % (self.baseurl, action),
+                404: _('the "lfs.url" config may be used to override %s')
+                       % self.baseurl,
+            }
+            hint = hints.get(ex.code, _('api=%s, action=%s') % (url, action))
+            raise LfsRemoteError(_('LFS HTTP error: %s') % ex, hint=hint)
         try:
             response = json.loads(rawjson)
         except ValueError: