pub enum Error {
VerificationFailure(String),
InvalidRequest(String),
FeatureDisabled(String),
NotFound(String),
UnexpectedStatus {
status: u16,
body: String,
},
Transport(Error),
Json(Error),
}Expand description
Errors returned by the MockServer client.
Variants§
VerificationFailure(String)
The server returned a verification failure (HTTP 406).
InvalidRequest(String)
The server returned an invalid request error (HTTP 400).
FeatureDisabled(String)
The requested feature is disabled on the server (e.g. HTTP 403 from an SRE control-plane endpoint such as load generation or SLO tracking).
Enable it via the corresponding server property (e.g.
loadGenerationEnabled=true, sloTrackingEnabled=true).
NotFound(String)
A named resource was not found (HTTP 404), e.g. starting or fetching a
load scenario whose name is not registered.
UnexpectedStatus
An unexpected HTTP status was returned.
Transport(Error)
A network or transport error from reqwest.
Json(Error)
Failed to serialize or deserialize JSON.
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()
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