Skip to content

Commit

Permalink
fix: backend sdk tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Dec 12, 2024
1 parent 3041401 commit 34e96da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions supertokens_python/auth_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion tests/test-server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", "{}"))
Expand Down

0 comments on commit 34e96da

Please sign in to comment.