#[non_exhaustive]pub enum Error {
Show 18 variants
Config(String),
Signature(String),
InvalidRequest(String),
PayloadTooLarge {
limit: usize,
},
Json(Error),
Http(Error),
ShopifyApi {
status: u16,
body: String,
},
GraphQl(Vec<String>),
Throttled {
retries: u32,
},
UnexpectedResponse(String),
InProgress(String),
StateMismatch,
ScopeMismatch {
missing: Vec<String>,
},
NotInstalled(String),
Reauthorize(String),
OAuthDisabled,
Store(String),
MissingRuntime,
}Expand description
The plugin error type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Config(String)
The [shopify] config is missing or not valid.
Signature(String)
An HMAC is missing, malformed, or wrong.
InvalidRequest(String)
The request is malformed.
PayloadTooLarge
The request body is larger than the limit.
Json(Error)
A JSON payload does not parse.
Http(Error)
A Shopify call failed at the transport level.
ShopifyApi
Shopify answered with a non-success status.
Fields
GraphQl(Vec<String>)
The GraphQL response has errors.
Throttled
Shopify throttled the call and the retries ran out.
UnexpectedResponse(String)
Shopify answered 200, but the body has the wrong shape.
InProgress(String)
Another delivery of this webhook id still runs.
StateMismatch
The OAuth state does not match the browser cookie.
ScopeMismatch
The merchant did not grant all requested scopes.
NotInstalled(String)
The shop has no stored access token.
The plugin cannot refresh the token. The merchant must install the app again.
OAuthDisabled
OAuth is off.
Store(String)
A token or delivery store failed.
MissingRuntime
The app does not use the plugin (no runtime in the app state).
Implementations§
Source§impl Error
impl Error
Sourcepub const fn status(&self) -> StatusCode
pub const fn status(&self) -> StatusCode
The HTTP status this error maps to.
Sourcepub fn to_autumn_error(&self) -> AutumnError
pub fn to_autumn_error(&self) -> AutumnError
Convert into an AutumnError with the status from
status.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Forget 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Scoped for T
impl<T> Scoped for T
Source§fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
ScopeQuery for this type. Resolves the
registered scope at .load() time, not here.