Example #1
0
 def __init__(self, reason, reason_code=None, errors=None, **extras):
     """
     :param reason: A nice message describing what was not valid
     :param reason_code: programmatic friendly reason code
     :param errors: A ``list`` or ``dict`` of nested ``ValidationError``
     :param extras: Any extra info about the error you want to convey
     """
     JsonWebError.__init__(self, reason, **extras)
     self.errors = errors
     self.reason_code = reason_code
Example #2
0
 def __init__(self, reason, reason_code=None, errors=None, **extras):
     """
     :param reason: A nice message describing what was not valid
     :param reason_code: programmatic friendly reason code
     :param errors: A ``list`` or ``dict`` of nested ``ValidationError``
     :param extras: Any extra info about the error you want to convey
     """
     JsonWebError.__init__(self, reason, **extras)
     self.errors = errors
     self.reason_code = reason_code
Example #3
0
 def __init__(self, message, **extras):
     JsonWebError.__init__(self, message, **extras)
Example #4
0
 def __init__(self, message, **extras):
     JsonWebError.__init__(self, message, **extras)
Example #5
0
 def __init__(self, message, error_sub_type, **extras):
     JsonWebError.__init__(self, message, "DATA_DECODE_ERROR", error_sub_type, **extras)
Example #6
0
 def __init__(self, message, error_sub_type=None, **extras):
     JsonWebError.__init__(self, message, "JSON_PARSE_ERROR", error_sub_type, **extras)
Example #7
0
 def __init__(self, message, errors=None):
     JsonWebError.__init__(self, message, "VALIDATION_ERROR")
     self.errors = errors