Add missing InvalidResponse class.
This commit is contained in:
parent
0e13ef3ff8
commit
d9f0d36dfe
1 changed files with 6 additions and 2 deletions
|
@ -53,6 +53,10 @@ class InvalidRequest(ApiException):
|
|||
def __init__(self, error_description, payload=None):
|
||||
ApiException.__init__(self, 'invalid_request', 400, error_description, payload)
|
||||
|
||||
class InvalidResponse(ApiException):
|
||||
def __init__(self, error_description, payload=None):
|
||||
ApiException.__init__(self, 'invalid_response', 400, error_description, payload)
|
||||
|
||||
|
||||
class InvalidToken(ApiException):
|
||||
def __init__(self, error_description, payload=None):
|
||||
|
@ -173,7 +177,7 @@ def path_param(name, description):
|
|||
def add_param(func):
|
||||
if not func:
|
||||
return func
|
||||
|
||||
|
||||
if '__api_path_params' not in dir(func):
|
||||
func.__api_path_params = {}
|
||||
func.__api_path_params[name] = {
|
||||
|
@ -293,7 +297,7 @@ def require_fresh_login(func):
|
|||
|
||||
if not user.password_hash or last_login >= valid_span:
|
||||
return func(*args, **kwargs)
|
||||
|
||||
|
||||
raise FreshLoginRequired()
|
||||
return wrapped
|
||||
|
||||
|
|
Reference in a new issue