Skip to content

feat(tx_cache): surface auth token retrieval errors#116

Open
init4samwise wants to merge 3 commits intomainfrom
samwise/eng-1798-surface-auth-token-error
Open

feat(tx_cache): surface auth token retrieval errors#116
init4samwise wants to merge 3 commits intomainfrom
samwise/eng-1798-surface-auth-token-error

Conversation

@init4samwise
Copy link

Summary

Surfaces auth token retrieval errors instead of silently using an empty string.

Changes

  • Add BuilderTxCacheError enum with:
    • TokenRetrieval variant wrapping watch::error::RecvError
    • TxCache variant wrapping existing TxCacheError
  • Replace unwrap_or_else with ? operator to propagate errors
  • Update local Result type alias to use BuilderTxCacheError

Breaking Change

This changes the return type from signet_tx_cache::error::Result to a new local Result type. Consumers will need to handle the new BuilderTxCacheError type.

Why

Per the ticket: "Right now, an empty string is used if the token retrieval fails, placing the responsibility of returning an appropriate error on the service being called. We should wrap the original error type, and add a variant that points out that there was a problem retrieving the token instead, surfacing the inner Recv error."

Closes ENG-1798

init4samwise and others added 2 commits February 6, 2026 16:40
ENG-1798: Add BuilderTxCacheError enum to properly surface auth token
retrieval failures instead of silently using an empty string.

Changes:
- Add BuilderTxCacheError with TokenRetrieval variant wrapping RecvError
- Add TxCache variant wrapping existing TxCacheError
- Replace unwrap_or_else with ? operator to propagate errors
- Update local Result type alias to use BuilderTxCacheError

This is a breaking change for consumers that expect the old Result type,
but surfaces the actual error cause for better debugging.
Copy link
Member

Evalir commented Feb 6, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Evalir Evalir requested review from Evalir and prestwich and removed request for prestwich February 6, 2026 17:05
@Evalir Evalir requested review from Fraser999 and prestwich February 6, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants