diff --git a/passageidentity/user.py b/passageidentity/user.py index 95257a3..4fa9a98 100644 --- a/passageidentity/user.py +++ b/passageidentity/user.py @@ -69,7 +69,7 @@ def get_by_identifier(self, identifier: str) -> PassageUser: raise PassageError.from_response_error(e, msg) from e if len(users) == 0: - msg = "Could not find user with identifier: {identifier}" + msg = "User not found." raise PassageError(msg) return self.get(users[0].id) diff --git a/tests/user_test.py b/tests/user_test.py index 6dfc059..2abbdb2 100644 --- a/tests/user_test.py +++ b/tests/user_test.py @@ -39,7 +39,7 @@ def test_get_by_identifier_valid_upper_case() -> None: def test_get_by_identifier_user_not_exist() -> None: psg = Passage(PASSAGE_APP_ID, PASSAGE_API_KEY) - with pytest.raises(PassageError, match="Could not find user with identifier"): + with pytest.raises(PassageError, match="User not found."): psg.user.get_by_identifier("error@passage.id")