From a6649534f130845e0504cf301103b431890fc699 Mon Sep 17 00:00:00 2001 From: Jerry Boonstra Date: Tue, 28 Dec 2021 13:53:47 -0800 Subject: [PATCH] two more methods should throw Exception in error state, instead of just logging an error and returning nothing --- pybit/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pybit/__init__.py b/pybit/__init__.py index d12ee5d..2f48ace 100644 --- a/pybit/__init__.py +++ b/pybit/__init__.py @@ -1573,7 +1573,7 @@ def create_internal_transfer(self, **kwargs): auth=True ) else: - self.logger.error('amount must be in string format') + raise Exception(f"amount must be in string format, got: '{kwargs.get('amount', None)}'") def create_subaccount_transfer(self, **kwargs): """ @@ -1594,7 +1594,7 @@ def create_subaccount_transfer(self, **kwargs): auth=True ) else: - self.logger.error('amount must be in string format') + raise Exception(f"amount must be in string format, got: '{kwargs.get('amount', None)}'") def query_transfer_list(self, **kwargs): """