Answer the question
In order to leave comments, you need to log in
How to find out about an error in making a call to VKontakte api through OpenApi?
The site, actually a JS application on React, works with the VK api through their OpenApi : the VK.Api.call() method , which takes only 3 parameters: the name of the method, the parameter object, and the callback function, where the execution result will be passed.
I noticed that when working from Chrome on the phone, errors occur relatively often: there is simply no response, timeout. Moreover, the request was executed in only 124ms, judging by the Net tab.
Console:
Question: how can I understand in my scripts that the callback is no longer worth waiting for?
Ps It is strange that such errors are quite frequent from a mobile phone, while there are no such errors at all from a computer through the same router - all requests are processed.
Pps so far, the working option is to try only authorize the user through OpenApi, and then VK.Auth.getLoginStatus()
work with the received token (the sid parameter from the answer to ) through normal ajax.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question