Execution flow error in the API integrated in pages for long response time fetches
FJRG2007 opened this issue · 1 comments
FJRG2007 commented
Astro Info
Astro v4.16.10
Node v22.9.0
System Windows (x64)
Package Manager npm
Output server
Adapter @astrojs/node
Integrations @astrojs/react
@astrojs/tailwind
@astrojs/mdx
astro-icon
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When performing a fetch that takes several seconds to return a response within the API on pages, Astro ignores the code behind the fetch for some reason, including the response return and the console logs.
What's the expected result?
The expected result is that the console logs are displayed and the response is returned to the frontend.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/withastro-astro-uhzfof?file=src%2Fpages%2Fapi%2Ftest.ts
Participation
- I am willing to submit a pull request for this issue.
FJRG2007 commented
Solved