diff --git a/upsonic/remote/on_prem.py b/upsonic/remote/on_prem.py index 56713e0..a32c8f9 100644 --- a/upsonic/remote/on_prem.py +++ b/upsonic/remote/on_prem.py @@ -205,7 +205,7 @@ def __init__(self, api_url, access_key, engine="cloudpickle,dill", enable_usage_ self.thread_number = 5 - def _send_request(self, method, endpoint, data=None, make_json=True): + def _send_request(self, method, endpoint, data=None, make_json=True, include_status=False): try: response = self.requests.request( method, @@ -225,7 +225,7 @@ def _send_request(self, method, endpoint, data=None, make_json=True): f"[bold red]Error: {endpoint}", ) else: - result = result["result"] + result = result["result"] if not include_status else result return result except: # pragma: no cover @@ -826,10 +826,15 @@ def set( "commit_message": message } - response = self._send_request("POST", "/dump_together", data) + response = self._send_request("POST", "/dump_together", data, include_status=True) + if response != [None]: - return True + if response["status"] is False: + return response["result"] + + if response["status"] is True: + return True else: return False