error
null
import { firestore } from '../utils/firebase'export default defineEventHandler(async event => { const query = getQuery(event) const snapshot = await firestore.collection('products').doc(query.id).get() if (snapshot.exists) { // code } else { throw new Error(`Product with id ${query.id} does not exist`) }})