pub enum KalamLinkError {
NetworkError(String),
AuthenticationError(String),
SetupRequired(String),
ServerError {
status_code: u16,
message: String,
},
ConfigurationError(String),
SerializationError(String),
WebSocketError(String),
TimeoutError(String),
Cancelled,
}Expand description
Errors that can occur during KalamDB SDK operations.
§Examples
use kalam_client::{KalamLinkClient, KalamLinkError};
let client = KalamLinkClient::builder().base_url("http://invalid-host:9999").build()?;
match client.execute_query("SELECT 1", None, None, None).await {
Ok(response) => println!("Success: {:?}", response),
Err(KalamLinkError::NetworkError(msg)) => {
eprintln!("Connection failed: {}", msg);
},
Err(e) => eprintln!("Other error: {}", e),
}Variants§
NetworkError(String)
Network or HTTP request errors
AuthenticationError(String)
Authentication failures (invalid token, expired credentials)
SetupRequired(String)
Server requires initial setup (root password not configured) The CLI should prompt the user to complete server setup
ServerError
Server returned an error response
ConfigurationError(String)
Invalid configuration (missing URL, invalid settings)
SerializationError(String)
JSON serialization/deserialization errors
WebSocketError(String)
WebSocket connection or protocol errors
TimeoutError(String)
Connection timeout
Cancelled
The operation was cancelled
Trait Implementations§
Source§impl Debug for KalamLinkError
impl Debug for KalamLinkError
Source§impl Display for KalamLinkError
impl Display for KalamLinkError
Source§impl Error for KalamLinkError
impl Error for KalamLinkError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for KalamLinkError
Available on crate feature tokio-runtime only.
impl From<Error> for KalamLinkError
Available on crate feature
tokio-runtime only.Source§fn from(err: Error) -> KalamLinkError
fn from(err: Error) -> KalamLinkError
Converts to this type from the input type.
Source§impl From<Error> for KalamLinkError
impl From<Error> for KalamLinkError
Source§fn from(err: Error) -> KalamLinkError
fn from(err: Error) -> KalamLinkError
Converts to this type from the input type.
Source§impl From<Error> for KalamLinkError
Available on crate feature tokio-runtime only.
impl From<Error> for KalamLinkError
Available on crate feature
tokio-runtime only.Source§fn from(err: Error) -> KalamLinkError
fn from(err: Error) -> KalamLinkError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for KalamLinkError
impl RefUnwindSafe for KalamLinkError
impl Send for KalamLinkError
impl Sync for KalamLinkError
impl Unpin for KalamLinkError
impl UnsafeUnpin for KalamLinkError
impl UnwindSafe for KalamLinkError
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
Mutably borrows from an owned value. Read more
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>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.