Skip to content

Is it possible to process custom statuses? #1341

Answered by timostamm
Stivin asked this question in Q&A
Discussion options

You must be logged in to vote

I think the best option is to provide a custom fetch function to the gRPC-Web transport. See the documentation here.

In this function, it should be easy enough to act on the custom HTTP status, and throw your own ConnectError. You can put the custom HTTP status into error metadata or error details (see the documentation here), so that you can retrieve it in a catch block.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Stivin
Comment options

Answer selected by Stivin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants