mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-09 22:50:54 +00:00
Raise HandshakeFailure in transport
Change the exception handling flow. Raise `SecurityUpgradeFailure` in security_multistream.
This commit is contained in:
@ -1,7 +1,14 @@
|
||||
from libp2p.exceptions import BaseLibp2pError
|
||||
|
||||
|
||||
# TODO: Add `BaseLibp2pError` and `UpgradeFailure` can inherit from it?
|
||||
class UpgradeFailure(Exception):
|
||||
class UpgradeFailure(BaseLibp2pError):
|
||||
pass
|
||||
|
||||
|
||||
class SecurityUpgradeFailure(UpgradeFailure):
|
||||
pass
|
||||
|
||||
|
||||
class HandshakeFailure(BaseLibp2pError):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user