L
L
LikeKey2021-03-03 07:30:17
Java
LikeKey, 2021-03-03 07:30:17

How to solve Internat server error in java vk sdk?

Mistake:

23:26:31.936 [ru.likekey.main.Application.main()] ERROR com.vk.api.sdk.client.ApiRequest - API error
com.vk.api.sdk.exceptions.ApiServerException: Internal server error (10): Internal server error
        at com.vk.api.sdk.exceptions.ExceptionMapper.parseException(ExceptionMapper.java:29) ~[sdk-1.0.7.jar:?]
        at com.vk.api.sdk.client.ApiRequest.executeWithoutRetry(ApiRequest.java:89) [sdk-1.0.7.jar:?]
        at com.vk.api.sdk.client.ApiRequest.execute(ApiRequest.java:64) [sdk-1.0.7.jar:?]
        at ru.likekey.main.Application.run(Application.java:63) [classes/:?]
        at ru.likekey.main.Application.main(Application.java:38) [classes/:?]
        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:254) [exec-maven-plugin-3.0.0.jar:?]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_282]

Every day at the same time (somewhere around 6 am Moscow time) an error starts to appear in the bot stating that there is some kind of error on the VK server. The documentation says that you need to wait until the VK developers solve the problem, but they obviously do not agree on something. If the log is clogged with this error, then only restarting the bot helps, otherwise it crashes into the log an infinite number of times. How to make it not appear?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
5
5am, 2021-03-03
​​@5am

use try-catch

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question