def METHOD_NAME(self, message):
    if isinstance(message, (list, dict, tuple)):
        self.errors.append(json.dumps(message, separators=(',', ':')))
    else:
        self.errors.append(str(message))