hashgraph / hedera-sdk-rust

The Hedera™ Rust SDK
Apache License 2.0
42 stars 14 forks source link

ops: Classify HTTP/2 Go Away and I/O Broken Pipe errors as transient #841

Closed iamjpotts closed 1 month ago

iamjpotts commented 2 months ago

Description:

Additional transient error detection for:

Related issue(s):

Depends on https://github.com/hashgraph/hedera-sdk-rust/pull/840.

Notes for reviewer:

This error will get retried (note that sample shows new designation as a warning; previously it was an error that did not get retried):

2024-09-09T00:13:03.664369Z  WARN hedera::execute: Execution of hedera::query::Query<hedera::account::account_balance_query::AccountBalanceQueryData> on node at index 1 / node id 0.0.4 will continue due to GrpcStatus(Status { code: Internal, message: "h2 protocol error: http2 error: connection error received: not a result of an error", source: Some(tonic::transport::Error(Transport, hyper::Error(Http2, Error { kind: GoAway(b"", NO_ERROR, Remote) }))) })

This broken pipe error will also get retried:

2024-09-09T02:15:35.996609Z  WARN hedera::execute: Execution of hedera::query::Query<hedera::account::account_balance_query::AccountBalanceQueryData> on node at index 0 / node id 0.0.3 will continue due to GrpcStatus(Status { code: Unknown, message: "transport error", source: Some(tonic::transport::Error(Transport, hyper::Error(Io, Custom { kind: BrokenPipe, error: "stream closed because of a broken pipe" }))) })

Checklist

No additional tests, due to difficulty in unit testing hyper error responses due to lack of public constructors for hyper errors.