catch UnicodeDecodeError

This commit is contained in:
Michiel De Witte 2019-02-20 09:53:58 +01:00
parent 6b91e581f6
commit 4e1c7d2bba

View file

@ -127,6 +127,9 @@ class Serializer(object):
return defines.Codes.BAD_REQUEST.number
except struct.error:
return defines.Codes.BAD_REQUEST.number
except UnicodeDecodeError as e:
logger.debug(e)
return defines.Codes.BAD_REQUEST.number
@staticmethod
def serialize(message):