Skip to content

Commit 22e1c29

Browse files
committed
errors: make EmptyPlan return LIB_NO_HOSTS_AVAILABLE
As I mentioned before - this error is returned when we for some reason cannot route the request to one of the hosts. I forgot to address this earlier (there was no test case for empty plan). I'll introduce one later in this PR.
1 parent cf03424 commit 22e1c29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scylla-rust-wrapper/src/cass_error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl ToCassError for ExecutionError {
3232
match self {
3333
ExecutionError::BadQuery(bad_query) => bad_query.to_cass_error(),
3434
ExecutionError::RequestTimeout(_) => CassError::CASS_ERROR_LIB_REQUEST_TIMED_OUT,
35-
ExecutionError::EmptyPlan => CassError::CASS_ERROR_LIB_INVALID_STATE,
35+
ExecutionError::EmptyPlan => CassError::CASS_ERROR_LIB_NO_HOSTS_AVAILABLE,
3636
ExecutionError::MetadataError(e) => e.to_cass_error(),
3737
ExecutionError::ConnectionPoolError(e) => e.to_cass_error(),
3838
ExecutionError::PrepareError(e) => e.to_cass_error(),

0 commit comments

Comments
 (0)