From 46bcfe7619e71206636c40f69a24b50af7833ec2 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Fri, 22 Jul 2022 08:31:48 -0400 Subject: [PATCH] Revert "Island: Add note about 401 for invalid credentials" This reverts commit 5938382627417e8277b808118dcc3994af178dbf. --- monkey/monkey_island/cc/resources/auth/registration.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/monkey/monkey_island/cc/resources/auth/registration.py b/monkey/monkey_island/cc/resources/auth/registration.py index 35b22fb4b..6c2124dd5 100644 --- a/monkey/monkey_island/cc/resources/auth/registration.py +++ b/monkey/monkey_island/cc/resources/auth/registration.py @@ -28,7 +28,5 @@ class Registration(AbstractResource): self._authentication_service.register_new_user(username, password) return make_response({"error": ""}, HTTPStatus.OK) # API Spec: HTTP status code for AlreadyRegisteredError should be 409 (CONFLICT) - # API Spec: HTTP status code for InvalidRegistrationCredentialsError should be 401 - # (UNAUTHORIZED). See https://www.rfc-editor.org/rfc/rfc7235#section-3.1 except (InvalidRegistrationCredentialsError, AlreadyRegisteredError) as e: return make_response({"error": str(e)}, HTTPStatus.BAD_REQUEST)