pub enum HeyoError {
Authentication,
InvalidArgument(String),
NotFound(String),
Api {
status: u16,
message: String,
body: Option<Value>,
},
Timeout(Duration, String),
SandboxFailed {
sandbox_id: String,
reason: String,
},
Connection(String),
SessionExpired {
session_id: Option<String>,
},
ShellExit(i32),
CheckinConflict {
expected: Option<i64>,
current: i64,
},
}Expand description
Every fallible call in the SDK returns Result<T, HeyoError>. Variants
mirror the TypeScript SDK’s error classes so the same recovery patterns
translate across languages.
Variants§
Authentication
No API key was provided and HEYO_API_KEY is unset.
InvalidArgument(String)
4xx other than 401/403/404 (e.g. 400 Bad Request, 422 Unprocessable).
NotFound(String)
404 Not Found.
Api
5xx, network error, or non-classified HTTP failure.
Timeout(Duration, String)
A wait_for_* call exceeded its budget.
SandboxFailed
Sandbox provisioning ended in failed.
Connection(String)
Shell-stream WebSocket could not be (re)established.
SessionExpired
Server refused to resume the shell session.
ShellExit(i32)
Remote shell exited unexpectedly.
CheckinConflict
Database::checkin rejected because data_version advanced.
Trait Implementations§
Source§impl Error for HeyoError
impl Error for HeyoError
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()
Auto Trait Implementations§
impl Freeze for HeyoError
impl RefUnwindSafe for HeyoError
impl Send for HeyoError
impl Sync for HeyoError
impl Unpin for HeyoError
impl UnsafeUnpin for HeyoError
impl UnwindSafe for HeyoError
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