From e59212621b1ffaac205c4e42cfa9c4ff84a68b93 Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Sat, 2 Dec 2023 06:30:03 -0500 Subject: [PATCH] chore: more logs cleanup (#118) --- dank_mids/constants.py | 4 ++-- dank_mids/requests.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dank_mids/constants.py b/dank_mids/constants.py index e5022c8a..f9860719 100644 --- a/dank_mids/constants.py +++ b/dank_mids/constants.py @@ -3,8 +3,8 @@ import multicall from multicall.constants import Network -TOO_MUCH_DATA_ERRS = ["Payload Too Large", "content length too large", "request entity too large"] -RETRY_ERRS = ["connection reset by peer", "server disconnected", "execution aborted (timeout = 5s)"] +TOO_MUCH_DATA_ERRS = ["Payload Too Large", "content length too large", "request entity too large", "batch limit exceeded"] +RETRY_ERRS = ["connection reset by peer", "server disconnected", "execution aborted (timeout = 5s)", "batch limit exceeded"] GAS_LIMIT = multicall.constants.GAS_LIMIT MULTICALL2_OVERRIDE_CODE = multicall.constants.MULTICALL2_BYTECODE diff --git a/dank_mids/requests.py b/dank_mids/requests.py index 801d7091..126b0d5d 100644 --- a/dank_mids/requests.py +++ b/dank_mids/requests.py @@ -793,7 +793,7 @@ def _post_future_cleanup(self) -> None: def _log_exception(e: Exception) -> None: # NOTE: These errors are expected during normal use and are not indicative of any problem(s). No need to log them. # TODO: Better filter what we choose to log here - dont_need_to_see_errs = constants.RETRY_ERRS + ['out of gas', 'non_empty_data', 'exceeding --rpc.returndata.limit', "'code': 429"] + dont_need_to_see_errs = constants.RETRY_ERRS + ['out of gas', 'non_empty_data', 'exceeding --rpc.returndata.limit', "'code': 429", 'payload too large'] # We catch and correct these dont_need_to_see_errs += ["invalid request"] # We pass these down to the call they originated from