Skip to content

Commit 1834beb

Browse files
committed
Update exception class
1 parent dc49a28 commit 1834beb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jtelegrambotapi-core/src/main/java/com/jtelegram/api/requests/framework/AbstractTelegramRequest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.jtelegram.api.TelegramBotRegistry;
55
import com.jtelegram.api.ex.InvalidResponseException;
66
import com.jtelegram.api.ex.NetworkException;
7+
import com.jtelegram.api.ex.TelegramApiException;
78
import com.jtelegram.api.ex.TelegramException;
89
import lombok.AccessLevel;
910
import lombok.AllArgsConstructor;
@@ -54,7 +55,7 @@ protected JsonElement validate(String response) {
5455

5556
if (!object.get("ok").getAsBoolean()) {
5657
// todo convert to good exceptions
57-
handleError(gson.fromJson(response, TelegramException.class));
58+
handleError(gson.fromJson(response, TelegramApiException.class));
5859
return null;
5960
}
6061

0 commit comments

Comments
 (0)