pub enum SurgeError {
Http(String),
Api {
status: Option<u16>,
message: String,
details: Value,
},
Tls(String),
Json(String),
Io(String),
Ignore(String),
InvalidProject(String),
Auth(String),
Network(String),
Config(String),
Event(String),
Unknown(String),
}
Expand description
Unified error type for the Surge SDK.
This enum encapsulates all possible error types that might occur during SDK usage, including:
- HTTP request failures
- Server-side API errors
- Event processing errors
- URL parsing issues
- JSON (de)serialization issues
- File system or I/O errors
- Ignore rules and directory walking issues
- Other unexpected or miscellaneous errors
Variants§
Http(String)
HTTP-related errors from the reqwest
crate.
Api
API errors returned by the remote server.
Tls(String)
TLS errors
Json(String)
JSON serialization/deserialization errors
Io(String)
File system or I/O errors
Ignore(String)
Directory traversal or ignore rules errors
InvalidProject(String)
Invalid project directory structure
Auth(String)
Authentication errors
Network(String)
Network errors
Config(String)
Configuration errors
Event(String)
Event processing errors
Unknown(String)
Unknown error variant
Implementations§
Trait Implementations§
Source§impl Debug for SurgeError
impl Debug for SurgeError
Source§impl<'de> Deserialize<'de> for SurgeError
impl<'de> Deserialize<'de> for SurgeError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SurgeError
impl Display for SurgeError
Source§impl Error for SurgeError
impl Error for SurgeError
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 SurgeError
impl From<Error> for SurgeError
Source§impl From<Error> for SurgeError
impl From<Error> for SurgeError
Source§impl From<Error> for SurgeError
impl From<Error> for SurgeError
Source§impl From<Error> for SurgeError
impl From<Error> for SurgeError
Source§impl From<Error> for SurgeError
impl From<Error> for SurgeError
Source§impl From<JoinError> for SurgeError
impl From<JoinError> for SurgeError
Source§impl From<ParseError> for SurgeError
impl From<ParseError> for SurgeError
Source§fn from(err: ParseError) -> Self
fn from(err: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<StripPrefixError> for SurgeError
impl From<StripPrefixError> for SurgeError
Source§fn from(err: StripPrefixError) -> Self
fn from(err: StripPrefixError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SurgeError
impl RefUnwindSafe for SurgeError
impl Send for SurgeError
impl Sync for SurgeError
impl Unpin for SurgeError
impl UnwindSafe for SurgeError
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