This might happen to a stranger who isn't a node and doesn't have a rest_url.

pull/2175/head
jMyles 2020-07-24 15:56:43 -07:00
parent a448903bbb
commit 924435ee37
1 changed files with 2 additions and 3 deletions

View File

@ -465,9 +465,8 @@ class Character(Learner):
f"Expected to connect to {stranger}, got {node_on_the_other_end} instead.")
else:
raise InvalidSignature("Signature for message isn't valid: {}".format(signature_to_use))
except (TypeError, AttributeError):
raise self.known_node_class.InvalidNode(
f"Unable to verify message from strange node at {stranger.rest_url()}")
except (TypeError, AttributeError) as e:
raise InvalidSignature(f"Unable to verify message from stranger: {stranger}")
else:
raise InvalidSignature("No signature provided -- signature presumed invalid.")