The same searchQuery provides accurate results for a lower PRISMIC_PAGE_SIZE value.
Also, this PRISMIC_PAGE_SIZE value limit for 422 Unprocessable Content is also based on searchQuery, what it means is, example:
Let's say for searchQuery = "ABC", the 422 would be returned only for pageSize greater than 80
But, for searchQuery = "XYZ", the 422 would be returned even for pageSize greater than 25
In our use-case, we are setting the pageSize = 75 by default, but as there are certain cases found, where the API may return 422 Unprocessable Content even for pageSize > 25,
Just wanted to know what could be the reason for it, thanks and regards.
Hi @arorakartik4. I'm not sure what could be causing this. I'd like to try to reproduce the issue. Can you share the URL for your Prismic repository with me? If you don't want it to be public, you can send me a private message.
Hi @Levi , thanks a lot for your response and time. I have shared with you the Prismic repository URL in a private message along with some other details, Kindly go through the details there. Regards.
Thanks for sharing your information in a private message. I recreated the error and then followed the Prismic URL that threw the error. This was the response I got:
The maximum size of response body is: 6 MO (6291456 bytes)
Your response is: 9.82 MO (10292401 bytes)
It looks like some of your documents might be exceptionally large, so they throw an error when you try to request them.
Thanks a lot for looking into it and providing valuable insights. Will communicate with our content team to inform them. For our existing setup, I'm thinking about the best practical solution possible.
Can you kindly assist further with these two points if possible:
This has to do with the total response size of the fulltext API response body right; is there a parameter in Rest API properties to limit the results by total body size, such that if it goes over the size limit, it may automatically limit the results, any possibility around this.
Is there a convenient way to determine the individual document size on Prismic for better planning by the content team.
Any of this or any other suggestions from the Prismic team would be helpful, or another option would be to keep the pageSize parameter to a lower value with multiple API calls for our use case.