#[non_exhaustive]pub enum ClickHouseError {
Config(ConfigError),
#[non_exhaustive] Database {
kind: ErrorKind,
detail: String,
},
#[non_exhaustive] Timeout {
timeout: Duration,
},
#[non_exhaustive] Migration {
name: String,
detail: String,
},
NotInstalled,
}Expand description
An error from the plugin.
The Debug output is the error text. It does not show detail.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Config(ConfigError)
The configuration is not valid.
#[non_exhaustive]Database
ClickHouse refused the call.
The text does not show detail, because it can hold user data.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Timeout
The call did not complete in time.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Migration
A migration failed.
The text does not show detail, because it can hold a server message.
Fields
This variant is marked as non-exhaustive
NotInstalled
The app does not have the plugin.
Implementations§
Source§impl ClickHouseError
impl ClickHouseError
Sourcepub fn detail(&self) -> Option<&str>
pub fn detail(&self) -> Option<&str>
The full message of a ClickHouseError::Database or ClickHouseError::Migration error.
The message can hold user data. Do not show it to users.
Sourcepub const fn kind(&self) -> Option<ErrorKind>
pub const fn kind(&self) -> Option<ErrorKind>
The ClickHouse error kind of a ClickHouseError::Database error.
Sourcepub const fn is_retryable(&self) -> bool
pub const fn is_retryable(&self) -> bool
Returns true if a retry of the same call can succeed.
Sourcepub const fn status(&self) -> StatusCode
pub const fn status(&self) -> StatusCode
The HTTP status for this error.
Sourcepub fn into_autumn(self) -> AutumnError
pub fn into_autumn(self) -> AutumnError
Converts to an AutumnError with status.
AutumnError has no bad-gateway constructor, so a 502 status becomes a 500.
The ? operator also converts, but always gives status 500.
Autumn shows server error details only in development.
Trait Implementations§
Source§impl Clone for ClickHouseError
impl Clone for ClickHouseError
Source§impl Debug for ClickHouseError
impl Debug for ClickHouseError
Source§impl Display for ClickHouseError
impl Display for ClickHouseError
impl Eq for ClickHouseError
Source§impl Error for ClickHouseError
impl Error for ClickHouseError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ConfigError> for ClickHouseError
impl From<ConfigError> for ClickHouseError
Source§fn from(source: ConfigError) -> Self
fn from(source: ConfigError) -> Self
Source§impl From<Error> for ClickHouseError
impl From<Error> for ClickHouseError
Source§impl PartialEq for ClickHouseError
impl PartialEq for ClickHouseError
impl StructuralPartialEq for ClickHouseError
Auto Trait Implementations§
impl Forget for ClickHouseError
impl Freeze for ClickHouseError
impl RefUnwindSafe for ClickHouseError
impl Send for ClickHouseError
impl Sync for ClickHouseError
impl Unpin for ClickHouseError
impl UnsafeUnpin for ClickHouseError
impl UnwindSafe for ClickHouseError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Scoped for T
impl<T> Scoped for T
Source§fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
ScopeQuery for this type. Resolves the
registered scope at .load() time, not here.