In the poll loop, any error from GetTransaction is swallowed and retried, so it cannot tell 'still in the mempool' (expected 404) from a real failure like a wrong -indexer URL or a network outage. That makes the command spin for the full maxAttempts (~2 minutes) before failing on what is actually a hard error. Detect the not-found case specifically and keep retrying only on that; return other errors immediately.
In the poll loop, any error from GetTransaction is swallowed and retried, so it cannot tell 'still in the mempool' (expected 404) from a real failure like a wrong -indexer URL or a network outage. That makes the command spin for the full maxAttempts (~2 minutes) before failing on what is actually a hard error. Detect the not-found case specifically and keep retrying only on that; return other errors immediately.