Skip to content

Commit

Permalink
[Conductor] Panic when the connection pool is disconnected (#34007)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 0f934dbeeb51a92ee81515b98e6f79f16779c6a0
  • Loading branch information
jordanhunt22 authored and Convex, Inc. committed Feb 4, 2025
1 parent 5a59e9e commit 210d030
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions crates/mysql/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,12 @@ where
let e = e.into();
if e.chain().any(|cause| matches!(
cause.downcast_ref(),
Some(
mysql_async::Error::Driver(DriverError::PoolDisconnected)
| mysql_async::Error::Io(_)
)
Some(mysql_async::Error::Driver(DriverError::PoolDisconnected))
)) {
panic!("{}", format!("MySQL pool disconnected: {e:#}"));
} else if e.chain().any(|cause| matches!(
cause.downcast_ref(),
Some(mysql_async::Error::Io(_))
)) {
Err(e.context(ErrorMetadata::operational_internal_server_error()))
} else {
Expand Down

0 comments on commit 210d030

Please sign in to comment.