File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 11import json
22import platform
33
4+ from onepassword .errors import raise_typed_exception
5+
46
57machine_arch = platform .machine ().lower ()
68
1618
1719# InitClient creates a client instance in the current core module and returns its unique ID.
1820async def _init_client (client_config ):
19- return await core .init_client (json .dumps (client_config ))
21+ try :
22+ return await core .init_client (json .dumps (client_config ))
23+ except Exception as e :
24+ raise_typed_exception (e )
2025
2126
2227# Invoke calls specified business logic from the SDK core.
2328async def _invoke (invoke_config ):
24- return await core .invoke (json .dumps (invoke_config ))
29+ try :
30+ return await core .invoke (json .dumps (invoke_config ))
31+ except Exception as e :
32+ raise_typed_exception (e )
2533
2634
2735# Invoke calls specified business logic from the SDK core.
2836def _invoke_sync (invoke_config ):
29- return core .invoke_sync (json .dumps (invoke_config ))
37+ try :
38+ return core .invoke_sync (json .dumps (invoke_config ))
39+ except Exception as e :
40+ raise_typed_exception (e )
3041
3142
3243# ReleaseClient releases memory in the SDK core associated with the given client ID.
You can’t perform that action at this time.
0 commit comments