[−][src]Enum fcm::response::FcmError
Fatal errors. Referred from Firebase documentation
Variants
The sender account used to send a message couldn't be authenticated. Possible causes are:
Authorization header missing or with invalid syntax in HTTP request.
- The Firebase project that the specified server key belongs to is incorrect.
- Legacy server keys only—the request originated from a server not whitelisted in the Server key IPs.
Check that the token you're sending inside the Authentication header is the correct Server key associated with your project. See Checking the validity of a Server key for details. If you are using a legacy server key, you're recommended to upgrade to a new key that has no IP restrictions.
InvalidMessage(String)
Check that the JSON message is properly formatted and contains valid fields (for instance, making sure the right data type is passed in).
ServerError(Option<RetryAfter>)
The server couldn't process the request. Retry the same request, but you must:
- Honor the RetryAfter value if included.
- Implement exponential back-off in your retry mechanism. (e.g. if you waited one second before the first retry, wait at least two second before the next one, then 4 seconds and so on). If you're sending multiple messages, delay each one independently by an additional random amount to avoid issuing a new request for all messages at the same time.
Senders that cause problems risk being blacklisted.
Trait Implementations
impl Debug for FcmError
[src]
impl Display for FcmError
[src]
impl Error for FcmError
[src]
pub fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
pub fn backtrace(&self) -> Option<&Backtrace>
[src]
pub fn description(&self) -> &str
1.0.0[src]
pub fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl From<Error> for FcmError
[src]
impl PartialEq<FcmError> for FcmError
[src]
impl StructuralPartialEq for FcmError
[src]
Auto Trait Implementations
impl RefUnwindSafe for FcmError
[src]
impl Send for FcmError
[src]
impl Sync for FcmError
[src]
impl Unpin for FcmError
[src]
impl UnwindSafe for FcmError
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,