Skip to content

Commit 210d030

Browse files
jordanhunt22Convex, Inc.
authored andcommitted
[Conductor] Panic when the connection pool is disconnected (#34007)
GitOrigin-RevId: 0f934dbeeb51a92ee81515b98e6f79f16779c6a0
1 parent 5a59e9e commit 210d030

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

crates/mysql/src/connection.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,12 @@ where
9191
let e = e.into();
9292
if e.chain().any(|cause| matches!(
9393
cause.downcast_ref(),
94-
Some(
95-
mysql_async::Error::Driver(DriverError::PoolDisconnected)
96-
| mysql_async::Error::Io(_)
97-
)
94+
Some(mysql_async::Error::Driver(DriverError::PoolDisconnected))
95+
)) {
96+
panic!("{}", format!("MySQL pool disconnected: {e:#}"));
97+
} else if e.chain().any(|cause| matches!(
98+
cause.downcast_ref(),
99+
Some(mysql_async::Error::Io(_))
98100
)) {
99101
Err(e.context(ErrorMetadata::operational_internal_server_error()))
100102
} else {

0 commit comments

Comments
 (0)