Closed tahadostifam closed 1 month ago
You can write something like this:
const client = createClient(ElizaService, transport);
async function* introduce(req: IntroduceRequest) {
for (; ;) {
try {
yield* client.introduce(req)
} catch (err) {
switch (ConnectError.from(err).code) {
// Codes we don't want to retry
case Code.InvalidArgument:
case Code.Unauthenticated:
throw err;
default:
// let the loop continue.
}
}
}
}
const res = introduce({});
Thank you for your reply, I did something similar at @kavkaco.
Is it possible to implement auto reconnect mechanism for connectrpc.com streams with connect-web? If yes, then how?