-
Notifications
You must be signed in to change notification settings - Fork 985
Closed
Labels
Description
[REQUIRED] Describe your environment
- Operating System version: macOS 12.6 - BuildVersion: 21G115
- Browser version: Versión 108.0.5359.124 (Build oficial) (x86_64)
- Firebase SDK version: 9.15.0
- Firebase Product: Firestore
[REQUIRED] Describe the problem
When trying to force an error, shutting down de emulator, instead throw error the API just print error in console. It doesn't permit execution of proper action in the code to manage error in UI.
Steps to reproduce:
- Stop Emulators
- Make a call to create a new document.
- Check catch and console logs.
Relevant Code:
const createParameter = async (parameter: ParameterType) => {
try {
console.log('Inside createParameter');
const docRef = await addDoc(collection(db, 'parameters'), parameter);
console.log('after addDoc');
console.log("Document written with ID: ", docRef.id);
parameter.id = docRef.id;
return parameter;
} catch (error) {
console.log('ERROR: DATABASE CONNECTION', error);
throw error;
}
}