Error No documents were returned

Hello,

We use a separate Prismic repo as a staging environment.
Current stack:
- "next": "^15.2.4",
- "@prismicio/client": "^7.15.1",
We are migrating from an SPA app. We wanted to make some stress test on the nextjS. On this stress test we are fetching one document from prismis and we are not doing any caching.
Sometimes the API doesn’t respond and we receive "Error No documents were returned" on the error.

Is this expected behavior for a non-production environment?

Hey @ionut.terhes, this should not happen if you're querying the API for published documents.

This kind of error can happen for a few reasons, but one common cause we’ve seen is missing or unpublished documents in the locale you're querying.

Since you’re not using any caching, it could also be that the document isn’t published yet.

Does the issue persist if you run the query directly in the API browser?