We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS
Safari 16.5.2
10.7.1
Database
index.html with source tag. Just javascript.
runTransaction errors can not be caught.
Start with the database empty.
var db = getDatabase(); connectDatabaseEmulator(db, '127.0.0.1', 9000); await update(ref(db, "users/testUser/starCount"), { starCount: increment(1) }); try { await runTransaction(ref(db, "users/testUser"), post => { console.log(post); if (post) { var starCount = post["starCount"]; starCount++; post["starCount"] = starCount; return post; } else { return null; } }); } catch (e) {//it never reaches catch console.error("transaction error"); console.error(e); }
The following error shows up on the console
Error: transaction failed: Data returned contains NaN in property 'users.testUser.starCount'
However, the error can never be caught. I also tried using a try catch block inside the transaction itself, and it still didn't work.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Operating System
macOS
Browser Version
Safari 16.5.2
Firebase SDK Version
10.7.1
Firebase SDK Product:
Database
Describe your project's tooling
index.html with source tag. Just javascript.
Describe the problem
runTransaction errors can not be caught.
Steps and code to reproduce issue
Start with the database empty.
The following error shows up on the console
Error: transaction failed: Data returned contains NaN in property 'users.testUser.starCount'
However, the error can never be caught. I also tried using a try catch block inside the transaction itself, and it still didn't work.
The text was updated successfully, but these errors were encountered: