mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-20 17:52:50 +00:00
immutable: do not catch arbitrary exceptions/failures from the attempt to get a crypttext hash tree -- catch only ServerFailure, IntegrityCheckReject, LayoutInvalid, ShareVersionIncompatible, and DeadReferenceError
Once again I inserted a bug into the code, and once again it was hidden by something catching arbitrary exception/failure and assuming that it means the server failed to provide valid data.
This commit is contained in:
parent
e598ca2f3f
commit
6011f4522f
@ -124,9 +124,14 @@ class ValidatedThingObtainer:
|
||||
self._log_id = log_id
|
||||
|
||||
def _bad(self, f, validatedthingproxy):
|
||||
failtype = f.trap(ServerFailure, IntegrityCheckReject, layout.LayoutInvalid, layout.ShareVersionIncompatible, DeadReferenceError)
|
||||
level = log.WEIRD
|
||||
if f.check(DeadReferenceError):
|
||||
level = log.UNUSUAL
|
||||
elif f.check(ServerFailure):
|
||||
level = log.WEIRD
|
||||
else:
|
||||
level = log.SCARY
|
||||
log.msg(parent=self._log_id, facility="tahoe.immutable.download",
|
||||
format="operation %(op)s from validatedthingproxy %(validatedthingproxy)s failed",
|
||||
op=self._debugname, validatedthingproxy=str(validatedthingproxy),
|
||||
|
Loading…
x
Reference in New Issue
Block a user