Skip to content

Commit 922f98c

Browse files
SK-2293 retry on every exception
1 parent 5700874 commit 922f98c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

skyflow/vault/_client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ def insert(self, records: dict, options: InsertOptions = InsertOptions()):
7575
if attempt < max_retries:
7676
continue
7777
else:
78-
raise SkyflowError(SkyflowErrorCodes.SERVER_ERROR, f"Error occurred: {err}", interface=interface)
78+
if isinstance(err, SkyflowError):
79+
raise err
80+
else:
81+
raise SkyflowError(SkyflowErrorCodes.SERVER_ERROR, f"Error occurred: {err}", interface=interface)
7982

8083
def detokenize(self, records: dict, options: DetokenizeOptions = DetokenizeOptions()):
8184
interface = InterfaceName.DETOKENIZE.value

0 commit comments

Comments
 (0)