Skip to content

Routinely returns AllAttemptsErrored([]) on failed requests #186

Description

@binarybaron

In these parts of the code we returning before adding the latest error to the errors: Vec<_>. This causes this code to return AllAttemptsErrored([]) which is a bit frustrating.

let failed_attempts = errors.len() + 1;
if retries_exhausted(failed_attempts, $self.config.retry()) {
warn!("call '{}' failed after {} attempts", stringify!($name), failed_attempts);
return Err(Error::AllAttemptsErrored(errors));
}
warn!("call '{}' failed with {}, retry: {}/{}", stringify!($name), e, failed_attempts, $self.config.retry());
errors.push(e);

let failed_attempts = errors.len() + 1;
if retries_exhausted(failed_attempts, $self.config.retry()) {
warn!("re-creating client failed after {} attempts", failed_attempts);
return Err(Error::AllAttemptsErrored(errors));
}
warn!("re-creating client failed with {}, retry: {}/{}", e, failed_attempts, $self.config.retry());
errors.push(e);

Activity

  1. ValuedMammal commented on Nov 13, 2025

    @ValuedMammal
    Contributor

    I'm looking for a way to reproduce it. Do you have any log output you can share? Have you tried increasing the Config::retry?

  2. ValuedMammal commented on Nov 13, 2025

    @ValuedMammal
    Contributor

    Yes it would make sense to add the latest error to errors before checking retries_exhausted. Also we're using the same errors vec to track both failed network calls as well as failure to recreate the client, but don't know if that's significant.

  3. binarybaron commented on Nov 13, 2025

    @binarybaron
    Author

    I don't have a good reproducable code sample unfortunately.

    I think part of this may have also been caused by our internal wrapper we wrote around the client (electrum-pool) and the way we propagate errors from that wrapper to the rest of the codebase (where it is logged).

    Our electrum-pool which load balances request over multiple servers sets the retries to 0 as we handle retries a layer above (in the load balancer itself). This may result in us never receiving the actual client errors.

  4. oleonardolima commented on Nov 18, 2025

    @oleonardolima
    Contributor

    Yes it would make sense to add the latest error to errors before checking retries_exhausted. Also we're using the same errors vec to track both failed network calls as well as failure to recreate the client, but don't know if that's significant.

    Agreed, maybe it's a good idea to revamp it and use different error vectors for each concern.

  5. binarybaron commented on Dec 3, 2025

    @binarybaron
    Author

    The eigenwallet project will award a bounty of 0.1 XMR (Monero) (around $39) to whoever fixes this issue. Maybe one of our contributors will pick this up at some point...

  6. added 2 commits that reference this issue on Dec 3, 2025
    9d4d4aa
    59c28bd
  7. added 4 commits that reference this issue on Jan 4, 2026
    130afa2
    b97d900
    9ad8195
    0339d62
  8. added 4 commits that reference this issue on Feb 12, 2026
    1fb023d
    bbb7ff2
    08f07c2
    b3f4986
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    • Status
      Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions