diff --git a/supertokens_python/recipe/passwordless/api/implementation.py b/supertokens_python/recipe/passwordless/api/implementation.py index 17aaaeba..fb6b49db 100644 --- a/supertokens_python/recipe/passwordless/api/implementation.py +++ b/supertokens_python/recipe/passwordless/api/implementation.py @@ -214,13 +214,11 @@ async def create_code_post( if not isinstance(pre_auth_checks_result, OkResponse): if isinstance(pre_auth_checks_result, SignUpNotAllowedResponse): - reason = error_code_map["SIGN_IN_NOT_ALLOWED"] + reason = error_code_map["SIGN_UP_NOT_ALLOWED"] assert isinstance(reason, str) return SignInUpPostNotAllowedResponse(reason) if isinstance(pre_auth_checks_result, SignInNotAllowedResponse): - reason = error_code_map["SIGN_IN_NOT_ALLOWED"] - assert isinstance(reason, str) - return SignInUpPostNotAllowedResponse(reason) + raise Exception("Should never come here") reason_dict = error_code_map["LINKING_TO_SESSION_USER_FAILED"] assert isinstance(reason_dict, Dict)