Skip to content

fix(zingod-grpc): expose grpc-retry-pushback-ms to gRPC-web clients - #23

Closed
danielgorgonha wants to merge 1 commit into
zingolabs:mainfrom
deegalabs:fix/expose-retry-pushback
Closed

danielgorgonha wants to merge 1 commit into
zingolabs:mainfrom
deegalabs:fix/expose-retry-pushback

Conversation

@danielgorgonha

Copy link
Copy Markdown
Contributor

Fixes: none (no issue open)

With [serve] grpc_web = true, a refusal is Trailers-Only, so its grpc-retry-pushback-ms travels as an HTTP header. A browser reads a response header only if CORS lists it in Access-Control-Expose-Headers, and the list has grpc-status, grpc-message and grpc-status-details-bin but not the pushback. So a browser wallet sees UNAVAILABLE and cannot honour the wait that book/src/wallets/status-codes.md asks for.

  • cors() exposes grpc-retry-pushback-ms, from the same constant admission.rs sends.
  • A test runs the CORS layer over the real refusal and checks the header is exposed; it fails without the change.
  • usage.md lists the pushback with the exposed headers.
  • Change file: patch.

We found it while reading the gRPC-web path for a browser client. #22 touches the same function; happy to rebase after it.

🤖 Generated with Claude Code

A refusal is Trailers-Only, so its grpc-retry-pushback-ms travels as an
HTTP header, and a browser can read a response header only if CORS
lists it. The status headers were listed; the pushback was not, so a
browser wallet could not honour the wait the status-codes chapter asks
for.

Assisted-by: Claude Code:claude-opus-5-5
@elicbarbieri

Copy link
Copy Markdown
Collaborator

Thanks @danielgorgonha I merged this in via #24

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