pub enum Error {
Show 13 variants
TimeError(SystemTimeError),
RequestError(Error),
JsonParseError(Error),
UpdateInfoError(UpdateInfoError),
NoDataFound,
ServersDown,
TechnicalError,
TimeoutError,
NoMoreQuestions,
ConnectionError,
CantGoBackAnyFurther,
InvalidAnswer,
InvalidLanguage,
}Expand description
the main Error enum for errors returned from akinator functions
Variants§
TimeError(SystemTimeError)
from propogating SystemTimeError when retrieving current timestamp fails when starting the game
RequestError(Error)
from propogating ReqwestError when making HTTP requests fails with reqwests across many akinator functions
JsonParseError(Error)
from propogating SerdeJsonError when deserializing json from str into a struct fails
UpdateInfoError(UpdateInfoError)
conversion from UpdateInfoError
NoDataFound
from when searching for information such as the WS url and session info etc.
ServersDown
from when the akinator servers in the specified region are down
TechnicalError
from when there is a technical internal error with the akinator servers
TimeoutError
from when the akinator session timed out waiting for a response
NoMoreQuestions
from when there are no more available questions the akinator has to offer
ConnectionError
from any other form of connection or server error
CantGoBackAnyFurther
from when calling back, fails often when we are already on the first questions so we can’t go back any more
InvalidAnswer
Simply an invalid answer to respond to the question when parsing from string
InvalidLanguage
from when an invalid or not supported language is passed when parsing from string