mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-02 22:59:48 +00:00
a little fix
This commit is contained in:
@@ -11,7 +11,7 @@ fun newRequestException(
|
|||||||
) = response.description ?.let { description ->
|
) = response.description ?.let { description ->
|
||||||
when {
|
when {
|
||||||
description == "Bad Request: reply message not found" -> ReplyMessageNotFoundException(response, plainAnswer, message, cause)
|
description == "Bad Request: reply message not found" -> ReplyMessageNotFoundException(response, plainAnswer, message, cause)
|
||||||
description.contains("Bad Request: message is not modified") -> MessageIsNotModifierException(response, plainAnswer, message, cause)
|
description.contains("Bad Request: message is not modified") -> MessageIsNotModifiedException(response, plainAnswer, message, cause)
|
||||||
description == "Unauthorized" -> UnauthorizedException(response, plainAnswer, message, cause)
|
description == "Unauthorized" -> UnauthorizedException(response, plainAnswer, message, cause)
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
@@ -36,5 +36,5 @@ class UnauthorizedException(response: Response, plainAnswer: String, message: St
|
|||||||
class ReplyMessageNotFoundException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
|
class ReplyMessageNotFoundException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
|
||||||
RequestException(response, plainAnswer, message, cause)
|
RequestException(response, plainAnswer, message, cause)
|
||||||
|
|
||||||
class MessageIsNotModifierException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
|
class MessageIsNotModifiedException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
|
||||||
RequestException(response, plainAnswer, message, cause)
|
RequestException(response, plainAnswer, message, cause)
|
||||||
|
Reference in New Issue
Block a user