chore: use better error variant

This commit is contained in:
discord9
2025-04-22 17:30:24 +08:00
parent 0d0dad4ba2
commit 3626a50395

View File

@@ -364,13 +364,13 @@ impl ConsistentCheckTask {
.send((allow_create, allow_drop, tx))
.await
.map_err(|_| {
UnexpectedSnafu {
IllegalCheckTaskStateSnafu {
reason: "Failed to send trigger signal",
}
.build()
})?;
rx.await.map_err(|_| {
UnexpectedSnafu {
IllegalCheckTaskStateSnafu {
reason: "Failed to receive trigger signal",
}
.build()
@@ -380,7 +380,7 @@ impl ConsistentCheckTask {
async fn stop(self) -> Result<(), Error> {
self.shutdown_tx.send(()).await.map_err(|_| {
UnexpectedSnafu {
IllegalCheckTaskStateSnafu {
reason: "Failed to send shutdown signal",
}
.build()