I’m using the FrappeClient, trying to creat multiple Material Request. I need to search BOM, Project data, Customer data to complete Material Request insert data.
If I run each one, it runs smoothly, like 1 seg
If I run 2 calls, the call takes 5 seconds.
At the 3rd call, the system throw an “Auth Fail” exception.
I change the order and the result it’s the same. 3rd call, it fails.
Is there any request limit on the API? If so, where change that? I need to do those calls n-times. Depends on the user request.
The solution was to built a REST class service to send and receive the server request.
The credential data is on a separate DB and it’s recovered just once. One cookie maintein the session alive so we can manage to make multiple calls (send a request, update the documents and receive the result we need to save to our separate db not in ERPNext DB)
As I share, I use a modified version of the FrappClient class above along with request class manager and request class processing.
In our application, we manage the calls and the results, nothing more.
The key is keeping alive your cookie and manage the API server response in order to avoid errors.
We were able to make around 300 sales invoice including Client creation in case it needed and saving the results in our DB to make other service stuuf we requiered.