diff --git a/supertokens_python/auth_utils.py b/supertokens_python/auth_utils.py index 18b7fbeb..ab0061f9 100644 --- a/supertokens_python/auth_utils.py +++ b/supertokens_python/auth_utils.py @@ -536,7 +536,7 @@ async def check_auth_type_and_linking_status( if session_user_result.status == "SHOULD_AUTOMATICALLY_LINK_FALSE": if should_try_linking_with_session_user is True: raise BadInputError( - "should_do_automatic_account_linking returned false when creating primary user but shouldTryLinkingWithSessionUser is true" + "shouldDoAutomaticAccountLinking returned false when making the session user primary but shouldTryLinkingWithSessionUser is true" ) return OkFirstFactorResponse() elif ( @@ -565,7 +565,7 @@ async def check_auth_type_and_linking_status( if isinstance(should_link, ShouldNotAutomaticallyLink): if should_try_linking_with_session_user is True: raise BadInputError( - "should_do_automatic_account_linking returned false when creating primary user but shouldTryLinkingWithSessionUser is true" + "shouldDoAutomaticAccountLinking returned false when making the session user primary but shouldTryLinkingWithSessionUser is true" ) return OkFirstFactorResponse() else: diff --git a/tests/test-server/app.py b/tests/test-server/app.py index 8ee45dd7..bdfd9206 100644 --- a/tests/test-server/app.py +++ b/tests/test-server/app.py @@ -278,7 +278,9 @@ async def custom_unauthorised_callback( _: BaseRequest, __: str, response: BaseResponse ) -> BaseResponse: response.set_status_code(401) - response.set_json_content(content={"type": "UNAUTHORISED"}) + response.set_json_content( + content={"type": "UNAUTHORISED", "message": "unauthorised"} + ) return response recipe_config_json = json.loads(recipe_config.get("config", "{}"))