From bbf003d335e4dcd3a19663d8a834f7c99aa0f21b Mon Sep 17 00:00:00 2001 From: acsbendi Date: Wed, 24 Jul 2019 17:21:33 +0200 Subject: [PATCH] Set correct HTTP codes for some auth-related errors. --- moto/core/exceptions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/moto/core/exceptions.py b/moto/core/exceptions.py index fcb1a095..06cfd889 100644 --- a/moto/core/exceptions.py +++ b/moto/core/exceptions.py @@ -68,7 +68,7 @@ class JsonRESTError(RESTError): class SignatureDoesNotMatchError(RESTError): - code = 400 + code = 403 def __init__(self): super(SignatureDoesNotMatchError, self).__init__( @@ -77,7 +77,7 @@ class SignatureDoesNotMatchError(RESTError): class InvalidClientTokenIdError(RESTError): - code = 400 + code = 403 def __init__(self): super(InvalidClientTokenIdError, self).__init__( @@ -98,7 +98,7 @@ class AccessDeniedError(RESTError): class AuthFailureError(RESTError): - code = 400 + code = 401 def __init__(self): super(AuthFailureError, self).__init__(