Skip to content

Commit

Permalink
Update exception class
Browse files Browse the repository at this point in the history
  • Loading branch information
mkotb committed Feb 18, 2020
1 parent dc49a28 commit 1834beb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.jtelegram.api.TelegramBotRegistry;
import com.jtelegram.api.ex.InvalidResponseException;
import com.jtelegram.api.ex.NetworkException;
import com.jtelegram.api.ex.TelegramApiException;
import com.jtelegram.api.ex.TelegramException;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
Expand Down Expand Up @@ -54,7 +55,7 @@ protected JsonElement validate(String response) {

if (!object.get("ok").getAsBoolean()) {
// todo convert to good exceptions
handleError(gson.fromJson(response, TelegramException.class));
handleError(gson.fromJson(response, TelegramApiException.class));
return null;
}

Expand Down

0 comments on commit 1834beb

Please sign in to comment.