Module telers::errors

source ·
Expand description

This module contains errors that can be returned by the library.

This module contains errors:

Re-exports§

  • pub use convert::ConvertToType as ConvertToTypeError;
  • pub use event::ErrorKind as EventErrorKind;
  • pub use extractor::Error as ExtractionError;
  • pub use handler::Error as HandlerError;
  • pub use middleware::Error as MiddlewareError;
  • pub use session::ErrorKind as SessionErrorKind;
  • pub use telegram::ErrorKind as TelegramErrorKind;

Modules§

  • This module contains the error ConvertToType that can occur when type be converted to the desired type. For example, if you try to convert an Update to a Message type, but the update represents a CallbackQuery, you got this error.
  • This module contains the error types that can occur when processing an event
  • This module contains the error type that can occur when extracting arguments from an event and a context to pass to a handler. For example, if you try to extract User from the Context and the context does not contain the user, you can use this error type.
  • This module contains the Error struct, which is a wrapper for any error that can occur when processing a handler. We use this wrapper around anyhow::Error, because it allows us to wrap any error type, including custom errors and don’t use anyhow::Error directly.
  • This module contains the Error struct, which is a wrapper for any error that can occur when processing a middleware. We use this wrapper around anyhow::Error, because it allows us to wrap any error type, including custom errors and don’t use anyhow::Error directly.
  • This module contains the ErrorKind enum, which is a wrapper for any error that can occur when processing sending request to the Telegram Bot API and parsing responses from it. Usually it’s a wrapper for TelegramErrorKind errors, but it can also been a wrapper for any other error that can occur when sending request or parsing response, for example serde_json::Error.
  • This module contains the ErrorKind enum that reprensents Telegram Bot API errors.