diff --git a/skyflow/vault/_client.py b/skyflow/vault/_client.py index 1c1236c..e21dcba 100644 --- a/skyflow/vault/_client.py +++ b/skyflow/vault/_client.py @@ -75,7 +75,10 @@ def insert(self, records: dict, options: InsertOptions = InsertOptions()): if attempt < max_retries: continue else: - raise SkyflowError(SkyflowErrorCodes.SERVER_ERROR, f"Error occurred: {err}", interface=interface) + if isinstance(err, SkyflowError): + raise err + else: + raise SkyflowError(SkyflowErrorCodes.SERVER_ERROR, f"Error occurred: {err}", interface=interface) def detokenize(self, records: dict, options: DetokenizeOptions = DetokenizeOptions()): interface = InterfaceName.DETOKENIZE.value