Log, don't raise.

This commit is contained in:
Itamar Turner-Trauring 2021-01-04 14:23:12 -05:00
parent eb8837a4c8
commit a46a7dc7f8

View File

@ -157,8 +157,9 @@ class URIHandler(resource.Resource, object):
try:
node = self.client.create_node_from_uri(name)
return directory.make_handler_for(node, self.client)
except (TypeError, AssertionError):
raise
except (TypeError, AssertionError) as e:
log.msg(format="Failed to parse cap, perhaps due to bug: %(e)s",
e=e, level=log.WEIRD)
raise WebError(
"'{}' is not a valid file- or directory- cap".format(name)
)