Although my fetch method is successful with other API calls, I am encountering an error when fetching from this specific API. The error message states:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'json')
Here's the code snippet for my fetch method:
import { ref } from "vue";
export default {
async setup() {
const prompProducts = ref(null);
const bc_prompProducts = await fetch(
"https://booking.hemantbhutanrealestate.com/api/v1/get_frontend_products"
);
prompProducts.value = await bc_prompProducts.json();
return {
prompProducts,
};
},
};
While this approach works flawlessly with other APIs, I'm encountering an error specifically with this one. Any assistance would be greatly appreciated, as the site is already live!