pub enum WebPushError {
Show 19 variants
Unspecified,
Unauthorized(ErrorInfo),
BadRequest(ErrorInfo),
ServerError {
retry_after: Option<Duration>,
info: ErrorInfo,
},
NotImplemented(ErrorInfo),
InvalidUri,
EndpointNotValid(ErrorInfo),
EndpointNotFound(ErrorInfo),
PayloadTooLarge,
Io(Error),
InvalidPackageName,
InvalidTtl,
InvalidTopic,
MissingCryptoKeys,
InvalidCryptoKeys,
InvalidResponse,
InvalidClaims,
ResponseTooLarge,
Other(ErrorInfo),
}Variants§
Unspecified
An unknown error happened while encrypting or sending the message
Please provide valid credentials to send the notification
BadRequest(ErrorInfo)
Request was badly formed
ServerError
Contains an optional Duration, until the user can retry the request
NotImplemented(ErrorInfo)
The feature is not implemented yet
InvalidUri
The provided URI is invalid
EndpointNotValid(ErrorInfo)
The URL specified is no longer valid and should no longer be used
EndpointNotFound(ErrorInfo)
The URL specified is invalid and should not be used again
PayloadTooLarge
Maximum allowed payload size is 3800 characters
Io(Error)
Error in reading a file
InvalidPackageName
Make sure the message was addressed to a registration token whose package name matches the value passed in the request (Google).
InvalidTtl
The TTL value provided was not valid or was not provided
InvalidTopic
The Topic value provided was invalid
MissingCryptoKeys
The request was missing required crypto keys
InvalidCryptoKeys
One or more of the crypto key elements are invalid.
InvalidResponse
Corrupted response data
InvalidClaims
A claim had invalid data
ResponseTooLarge
Response from push endpoint was too large
Other(ErrorInfo)
Implementations§
Source§impl WebPushError
impl WebPushError
pub fn short_description(&self) -> &'static str
Trait Implementations§
Source§impl Debug for WebPushError
impl Debug for WebPushError
Source§impl Display for WebPushError
impl Display for WebPushError
Source§impl Error for WebPushError
impl Error for WebPushError
1.30.0 · 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()
Source§impl From<Error> for WebPushError
impl From<Error> for WebPushError
Source§fn from(_: JsonError) -> WebPushError
fn from(_: JsonError) -> WebPushError
Source§impl From<Error> for WebPushError
Available on crate feature isahc-client only.
impl From<Error> for WebPushError
isahc-client only.