diff --git a/coapthon/serializer.py b/coapthon/serializer.py index f938eeb..5a61adc 100644 --- a/coapthon/serializer.py +++ b/coapthon/serializer.py @@ -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):