Question:
How to resolve the Request failed With Status code 413 error
Product:
Wix Editor,
What are you trying to achieve:
To avoid reaching the limit of 14 seconds of requests in the back-end, I built a method that returns the result of the query to the client.
If it is smaller and there are more records, it enters a while loop until the total number of records is complete.
What have you already tried:
Currently I have already created logic to go to the back-end and fetch the necessary data, if there is a timeout error it will try again. I also built a function called searchData on the client, which is responsible for calling the query in the back and bringing all the data until the overall data total is finalized.
The “Search” function is responsible for performing a query on the backend and returning the data.
And the fetchData function only processes the object for return to the front.
Additional information:
The error occurs after reaching skip 6500, totaling 13 requests to the back-end. After reaching this number, I got the Request failed With Status code 413 error.
Could you help me with this? How to solve ?
Improvement? Alternative?
That status code means your request is too large, it is not about the amount of requests to the backend.
I am not sure exactly which part of your response is causing this, but hopefully that information will help you debug more successfully.
If you do not find a path forward you may need to reach out to customer care for options if you are running into a compute limit and cannot break up the size in some way
So glad that worked out! A tip to help future debugging, out HTTP status codes are not specific to Wix they are the same as the regular standard so when. you face a code like 413, 423, etc you can search to see what the term means. How you need to handle on Wix can vary depending on the situation, but it’s a good place to start!