##// END OF EJS Templates
lfs: improve an exception message for blob corruption detected on transfer...
Matt Harbison -
r50427:250d9c8a default
parent child Browse files
Show More
@@ -168,12 +168,16 b' class local:'
168 # producing the response (but the server has no way of telling us
168 # producing the response (but the server has no way of telling us
169 # that), and we really don't need to try to write the response to
169 # that), and we really don't need to try to write the response to
170 # the localstore, because it's not going to match the expected.
170 # the localstore, because it's not going to match the expected.
171 # The server also uses this method to store data uploaded by the
172 # client, so if this happens on the server side, it's possible
173 # that the client crashed or an antivirus interfered with the
174 # upload.
171 if content_length is not None and int(content_length) != size:
175 if content_length is not None and int(content_length) != size:
172 msg = (
176 msg = (
173 b"Response length (%d) does not match Content-Length "
177 b"Response length (%d) does not match Content-Length "
174 b"header (%d): likely server-side crash"
178 b"header (%d) for %s"
175 )
179 )
176 raise LfsRemoteError(_(msg) % (size, int(content_length)))
180 raise LfsRemoteError(_(msg) % (size, int(content_length), oid))
177
181
178 realoid = hex(sha256.digest())
182 realoid = hex(sha256.digest())
179 if realoid != oid:
183 if realoid != oid:
General Comments 0
You need to be logged in to leave comments. Login now