Skip to main content

is_retryable_connect_error

Function is_retryable_connect_error 

Source
fn is_retryable_connect_error(err: &Error) -> bool
Expand description

Whether a connection error is transient and worth retrying.

Azure SQL Database returns error 40613 (“Database … is not currently available”) while a serverless database is resuming or being scaled, which can take tens of seconds. The connection succeeds once the database is online, so we retry rather than fail the test.