lbry-sdk/lbrynet/extras/reflector/common.py
2018-11-04 20:25:24 -05:00

27 lines
631 B
Python

REFLECTOR_V1 = 0
REFLECTOR_V2 = 1
class ReflectorClientVersionError(Exception):
"""
Raised by reflector server if client sends an incompatible or unknown version
"""
class ReflectorRequestError(Exception):
"""
Raised by reflector server if client sends a message without the required fields
"""
class ReflectorRequestDecodeError(Exception):
"""
Raised by reflector server if client sends an invalid json request
"""
class IncompleteResponse(Exception):
"""
Raised by reflector server when client sends a portion of a json request,
used buffering the incoming request
"""