|
16 | 16 | //! - [CollectionType], |
17 | 17 | //! |
18 | 18 |
|
19 | | -use crate::client::pager::QueryPager; |
| 19 | +use crate::client::pager::{NextPageError, NextRowError, QueryPager}; |
20 | 20 | use crate::cluster::node::resolve_contact_points; |
21 | 21 | use crate::deserialize::DeserializeOwnedRow; |
22 | 22 | use crate::errors::{DbError, NewSessionError, QueryError, RequestAttemptError}; |
@@ -52,7 +52,7 @@ use uuid::Uuid; |
52 | 52 | use crate::cluster::node::{InternalKnownNode, NodeAddr, ResolvedContactPoint}; |
53 | 53 | use crate::errors::{ |
54 | 54 | KeyspaceStrategyError, KeyspacesMetadataError, MetadataError, PeersMetadataError, |
55 | | - ProtocolError, TablesMetadataError, UdtMetadataError, ViewsMetadataError, |
| 55 | + ProtocolError, RequestError, TablesMetadataError, UdtMetadataError, ViewsMetadataError, |
56 | 56 | }; |
57 | 57 |
|
58 | 58 | type PerKeyspace<T> = HashMap<String, T>; |
@@ -1874,7 +1874,15 @@ async fn query_table_partitioners( |
1874 | 1874 | // that we are only interested in the ones resulting from non-existent table |
1875 | 1875 | // system_schema.scylla_tables. |
1876 | 1876 | // For more information please refer to https://github.com/scylladb/scylla-rust-driver/pull/349#discussion_r762050262 |
1877 | | - Err(QueryError::DbError(DbError::Invalid, _)) => Ok(HashMap::new()), |
| 1877 | + // FIXME 2: The specific error we expect here should appear in QueryError::NextRowError. Currently |
| 1878 | + // leaving match against both variants. This will be fixed, once `MetadataError` is further adjusted |
| 1879 | + // in a follow-up PR. The goal is to return MetadataError from all functions related to metadata fetch. |
| 1880 | + Err(QueryError::DbError(DbError::Invalid, _)) |
| 1881 | + | Err(QueryError::NextRowError(NextRowError::NextPageError( |
| 1882 | + NextPageError::RequestFailure(RequestError::LastAttemptError( |
| 1883 | + RequestAttemptError::DbError(DbError::Invalid, _), |
| 1884 | + )), |
| 1885 | + ))) => Ok(HashMap::new()), |
1878 | 1886 | result => result, |
1879 | 1887 | } |
1880 | 1888 | } |
|
0 commit comments