diff --git a/dank_mids/_requests.py b/dank_mids/_requests.py index 8c994f17..d6222098 100644 --- a/dank_mids/_requests.py +++ b/dank_mids/_requests.py @@ -773,13 +773,13 @@ async def post(self) -> Tuple[List[RawResponse], List[Union[Multicall, RPCReques logger.debug("caught %s for %s, reraising", e, self) if ENVS.DEBUG: # type: ignore [attr-defined] _debugging.failures.record(self.controller.chain_id, e, type(self).__name__, self.uid, len(self), self.data) - raise e + raise except Exception as e: if 'broken pipe' in str(e).lower(): logger.warning("This is what broke the pipe: %s", self.method_counts) if ENVS.DEBUG: # type: ignore [attr-defined] _debugging.failures.record(self.controller.chain_id, e, type(self).__name__, self.uid, len(self), self.data) - raise e + raise # NOTE: A successful response will be a list of `RawResponse` objects. # A single `PartialResponse` implies an error. if isinstance(response, list): diff --git a/dank_mids/brownie_patch/call.py b/dank_mids/brownie_patch/call.py index 890c9bde..aa30ad5d 100644 --- a/dank_mids/brownie_patch/call.py +++ b/dank_mids/brownie_patch/call.py @@ -116,7 +116,7 @@ async def decode_output(call: ContractCall, data: bytes) -> Any: except AttributeError as e: # NOTE: Not sure why this happens as we set the attr while patching the call but w/e, this works for now if not str(e).endswith(" object has no attribute '_skip_decoder_proc_pool'"): - raise e + raise logger.debug("DEBUG ME BRO: %s", e) call._skip_decoder_proc_pool = call._address in _skip_proc_pool return await decode_output(call, data) @@ -144,7 +144,7 @@ def __encode_input(abi: Dict[str, Any], signature: str, *args: Tuple[Any,...]) - break except Exception as e: if "429" not in str(e): - raise e + raise if multicall2 := MULTICALL2_ADDRESSES.get(chainid, None): _skip_proc_pool.add(to_checksum_address(multicall2)) @@ -180,5 +180,5 @@ def __validate_output(abi: Dict[str, Any], hexstr: BytesLike): try: raise VirtualMachineError(e) from None except: - raise e + raise e from e.__cause__ diff --git a/dank_mids/brownie_patch/overloaded.py b/dank_mids/brownie_patch/overloaded.py index 9c47aa44..7f6af15e 100644 --- a/dank_mids/brownie_patch/overloaded.py +++ b/dank_mids/brownie_patch/overloaded.py @@ -26,7 +26,7 @@ async def coroutine( exc_str = str(e) breakpoint = exc_str.find("(*args)") raise ValueError(f"{exc_str[:breakpoint]}.coroutine{exc_str[breakpoint:]}") - raise e + raise kwargs = {"block_identifier": block_identifier, "decimals": decimals, "override": override} kwargs = {k: v for k, v in kwargs.items() if v is not None} diff --git a/dank_mids/controller.py b/dank_mids/controller.py index c0c56da7..f1d1c98c 100644 --- a/dank_mids/controller.py +++ b/dank_mids/controller.py @@ -154,7 +154,7 @@ async def __call__(self, method: RPCEndpoint, params: Any) -> RPCResponse: return await queue(self, method, params) except TypeError as e: if "unhashable type" not in str(e): - raise e + raise return await queue(self, method, _helpers._make_hashable(params)) @eth_retry.auto_retry