Set correct HTTP codes for some auth-related errors.

This commit is contained in:
acsbendi 2019-07-24 17:21:33 +02:00
parent 3dd2e3a1b8
commit bbf003d335

View File

@ -68,7 +68,7 @@ class JsonRESTError(RESTError):
class SignatureDoesNotMatchError(RESTError): class SignatureDoesNotMatchError(RESTError):
code = 400 code = 403
def __init__(self): def __init__(self):
super(SignatureDoesNotMatchError, self).__init__( super(SignatureDoesNotMatchError, self).__init__(
@ -77,7 +77,7 @@ class SignatureDoesNotMatchError(RESTError):
class InvalidClientTokenIdError(RESTError): class InvalidClientTokenIdError(RESTError):
code = 400 code = 403
def __init__(self): def __init__(self):
super(InvalidClientTokenIdError, self).__init__( super(InvalidClientTokenIdError, self).__init__(
@ -98,7 +98,7 @@ class AccessDeniedError(RESTError):
class AuthFailureError(RESTError): class AuthFailureError(RESTError):
code = 400 code = 401
def __init__(self): def __init__(self):
super(AuthFailureError, self).__init__( super(AuthFailureError, self).__init__(