timeoutException static method

TeleverseException timeoutException(
  1. StackTrace st,
  2. Duration timeout
)

Exception thrown when the timeout exception occurs.

Implementation

static TeleverseException timeoutException(StackTrace st, Duration timeout) {
  return TeleverseException(
    "Connection timeout.",
    description:
        "The request took too long to complete. This might be due to a slow internet connection or sometimes due to the Telegram servers. Try again later.\n\n"
        "Possible solutions:\n"
        "   1. Increase the timeout duration. Currently it is set to $timeout.\n"
        "   2. Check your internet connection.\n"
        "   3. Attach a error handler using `Bot.onError` to handle the timeout exception.",
    stackTrace: st,
    type: TeleverseExceptionType.timeoutException,
  );
}