Skip to content

Commit aa3ec9e

Browse files
committed
Use porper exception name
The new exception added now matches the naming convention for typed errors
1 parent a204769 commit aa3ec9e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/onepassword/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import platform
44
from typing import Any, Protocol
55
from onepassword.desktop_core import DesktopCore
6-
from onepassword.errors import raise_typed_exception, DesktopSessionExpired
6+
from onepassword.errors import raise_typed_exception, DesktopSessionExpiredException
77

88
# In empirical tests, we determined that maximum message size that can cross the FFI boundary
99
# is ~128MB. Past this limit, FFI will throw an error and the program will crash.
@@ -31,7 +31,7 @@ def __init__(self, client_id: int, core: "DesktopCore | UniffiCore", config: dic
3131
async def invoke(self, invoke_config: dict):
3232
try:
3333
return await self.core.invoke(invoke_config)
34-
except DesktopSessionExpired as e:
34+
except DesktopSessionExpiredException as e:
3535
new_client_id = await self.core.init_client(self.config)
3636
self.client_id = new_client_id
3737
invoke_config["invocation"]["clientId"] = self.client_id

src/onepassword/errors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import json
44

55

6-
class DesktopSessionExpired(Exception):
6+
class DesktopSessionExpiredException(Exception):
77
def __init__(self, message):
88
self.message = message
99
super().__init__(self.message)
@@ -25,7 +25,7 @@ def raise_typed_exception(e: Exception):
2525
message = typed_error.get("message")
2626

2727
if error_name == "DesktopSessionExpired":
28-
raise DesktopSessionExpired(message)
28+
raise DesktopSessionExpiredException(message)
2929
elif error_name == "RateLimitExceeded":
3030
raise RateLimitExceededException(message)
3131
elif message is not None:

0 commit comments

Comments
 (0)