Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: update dbconnection errors #188

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
refactor: Update dbconnection errors
  • Loading branch information
peasee committed Nov 27, 2024
commit 4c9b8481443ece7c07b480c001ae0517a6e00121
8 changes: 5 additions & 3 deletions src/sql/db_connection_pool/dbconnection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Result<T, E = GenericError> = std::result::Result<T, E>;

#[derive(Debug, Snafu)]
pub enum Error {
#[snafu(display("Unable to downcast connection"))]
#[snafu(display("Unable to downcast connection.\nReport a bug to request support: https://github.com/datafusion-contrib/datafusion-table-providers/issues"))]
UnableToDowncastConnection {},

#[snafu(display("{source}"))]
Expand All @@ -35,10 +35,12 @@ pub enum Error {
field_name: String,
},

#[snafu(display("Unable to query arrow: {source}"))]
#[snafu(display("Failed to execute query.\n{source}"))]
UnableToQueryArrow { source: GenericError },

#[snafu(display("Table {table_name} not found. Ensure the table name is correctly spelled."))]
#[snafu(display(
"Table '{table_name}' not found. Ensure the table name is correctly spelled."
))]
UndefinedTable {
table_name: String,
source: GenericError,
Expand Down