N
Nuxt8mo ago
robertb45

Does useAsyncData block further useAsyncData calls if one fails/errors?

I have the next scenario where I have a page that uses 2 useAsyncData() composables, they call async functions that come from 2 different Pinia stores and the second one depends on the other like this:
await useAsyncData(() => getAudioRecentResultById(route.params.audioId))
await useAsyncData(() => getTranscriptionById(results.value.id))
await useAsyncData(() => getAudioRecentResultById(route.params.audioId))
await useAsyncData(() => getTranscriptionById(results.value.id))
But the problem I'm facing right now is that, if the first function has an error, currently a 422, for some reason the next useAsyncData() call is not made and the store that contains that second function, also contains a transcription ref which is re-set to null before doing the call, but since the second useAsyncData is not called, the old data persists (if there is) Is this flow correct and how could I fix it?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server