Is it possible to utilize the FirestoreError class within Firebase cloud functions?
The goal is to raise errors with a FirestoreError type when a document or field is not found in Firestore:
throw new FirestoreError();
Upon importing FirestoreError using
import { FirestoreError } from "firebase/firestore";
and attempting to throw a FirestoreError, an error stating that the constructor is private is encountered. Can a FirestoreError be thrown from a Firebase function, or is it necessary to use HttpsError instead?
Appreciate any insights.