Issue with nuxt-api-party in store: Page breaks on repeated fetch #93
Unanswered
gabrielgomeso
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm using the nuxt-api-party composable to make a fetch call inside a store. This fetch is triggered both when the page loads and when the user clicks a button. Here's a simplified version of my code:
On page load: Everything works perfectly.
When the user clicks the button: In staging, triggering this function again causes a general error that breaks the entire page.
This is the error I get:
POST https://www.mywebsite.com/api/__api_party/merchantsApi 404 (Not Found)
In development mode: The simulation works, but I get the following warning:
nuxt-api-party.mjs:4 [nuxt] [useAsyncData] Component is already mounted, please use $fetch instead.
This is my nuxt-api-party config:
Questions:
Is this warning related to the page breaking in staging?
How can I modify this code to avoid the warning and prevent the page from breaking?
Any guidance on how to resolve this issue would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions