pub enum Error {
Show 18 variants
MissingApiKey,
Authentication(String),
NotFound(String),
Conflict(String),
Timeout,
InvalidArgument(String),
RateLimit(String),
NotEnoughSpace(String),
FileNotFound(String),
CommandExit {
result: CommandResult,
},
Sandbox(String),
Http(Error),
Url(ParseError),
Json(Error),
WebSocket(Error),
HttpHeader(InvalidHeaderValue),
Io(Error),
HttpBuild(Error),
}Expand description
Error type returned by Watasu SDK operations.
Variants§
MissingApiKey
No API key was provided and WATASU_API_KEY was not set.
Authentication(String)
Authentication or authorization failed.
NotFound(String)
Requested resource was not found.
Conflict(String)
The requested operation conflicts with current resource state.
Timeout
The request timed out.
InvalidArgument(String)
The API rejected the request arguments.
RateLimit(String)
The API rate limited the request.
NotEnoughSpace(String)
The sandbox or file operation ran out of space.
FileNotFound(String)
A requested file path did not exist.
CommandExit
A command exited with a non-zero code and preserved output.
Fields
§
result: CommandResultCaptured command result.
Sandbox(String)
Generic sandbox or API error.
Http(Error)
HTTP transport error.
Url(ParseError)
URL parsing error.
Json(Error)
JSON serialization or decoding error.
WebSocket(Error)
WebSocket transport error.
HttpHeader(InvalidHeaderValue)
HTTP header construction error.
Io(Error)
Local I/O error.
HttpBuild(Error)
HTTP request construction error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<InvalidHeaderValue> for Error
impl From<InvalidHeaderValue> for Error
Source§fn from(source: InvalidHeaderValue) -> Self
fn from(source: InvalidHeaderValue) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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