catch msgpack decode errors
This commit is contained in:
parent
ab15a2448d
commit
a8236f69bf
|
@ -651,7 +651,11 @@ class Agent(BaseAuditModel):
|
||||||
except ErrTimeout:
|
except ErrTimeout:
|
||||||
ret = "timeout"
|
ret = "timeout"
|
||||||
else:
|
else:
|
||||||
|
try:
|
||||||
ret = msgpack.loads(msg.data) # type: ignore
|
ret = msgpack.loads(msg.data) # type: ignore
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(e)
|
||||||
|
ret = str(e)
|
||||||
|
|
||||||
await nc.close()
|
await nc.close()
|
||||||
return ret
|
return ret
|
||||||
|
|
Loading…
Reference in New Issue