bug fixes
This commit is contained in:
@@ -8,6 +8,14 @@ macro_rules! apibail_timeout {
|
||||
};
|
||||
}
|
||||
|
||||
#[allow(unused_macros)]
|
||||
#[macro_export]
|
||||
macro_rules! apibail_try_again {
|
||||
() => {
|
||||
return Err(VeilidAPIError::try_again())
|
||||
};
|
||||
}
|
||||
|
||||
#[allow(unused_macros)]
|
||||
#[macro_export]
|
||||
macro_rules! apibail_generic {
|
||||
@@ -95,6 +103,8 @@ pub enum VeilidAPIError {
|
||||
AlreadyInitialized,
|
||||
#[error("Timeout")]
|
||||
Timeout,
|
||||
#[error("TryAgain")]
|
||||
TryAgain,
|
||||
#[error("Shutdown")]
|
||||
Shutdown,
|
||||
#[error("Key not found: {key}")]
|
||||
@@ -131,6 +141,9 @@ impl VeilidAPIError {
|
||||
pub fn timeout() -> Self {
|
||||
Self::Timeout
|
||||
}
|
||||
pub fn try_again() -> Self {
|
||||
Self::TryAgain
|
||||
}
|
||||
pub fn shutdown() -> Self {
|
||||
Self::Shutdown
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user