mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
fix: auto retry once for connection closed (#3426)
Co-authored-by: venkatesh.devendran <venkatesh.devendran@juspay.in> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -267,7 +267,7 @@ pub enum ApiClientError {
|
||||
RequestTimeoutReceived,
|
||||
|
||||
#[error("connection closed before a message could complete")]
|
||||
ConnectionClosed,
|
||||
ConnectionClosedIncompleteMessage,
|
||||
|
||||
#[error("Server responded with Internal Server Error")]
|
||||
InternalServerErrorReceived,
|
||||
@ -285,8 +285,8 @@ impl ApiClientError {
|
||||
pub fn is_upstream_timeout(&self) -> bool {
|
||||
self == &Self::RequestTimeoutReceived
|
||||
}
|
||||
pub fn is_connection_closed(&self) -> bool {
|
||||
self == &Self::ConnectionClosed
|
||||
pub fn is_connection_closed_before_message_could_complete(&self) -> bool {
|
||||
self == &Self::ConnectionClosedIncompleteMessage
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user