-
Notifications
You must be signed in to change notification settings - Fork 962
fix(firestore): fix empty message reject inside transaction body #9177
New issue
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@firebase/firestore': major | ||
--- | ||
|
||
Fixed a bug where a rejected promise with an empty message in a transaction would cause a timeout. (https://github.com/firebase/firebase-js-sdk/issues/9147) | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,7 +113,7 @@ export class TransactionRunner<T> { | |
} | ||
|
||
private isRetryableTransactionError(error: Error): boolean { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can make
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ultranit: Consider using It's somewhat nonsensical to not specify an argument to a function named "isRetryableTransactionError", and defining the parameter as In contrast, specifying the argument as IMO the latter is the intended use. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
if (error.name === 'FirebaseError') { | ||
if (error?.name === 'FirebaseError') { | ||
// In transactions, the backend will fail outdated reads with FAILED_PRECONDITION and | ||
// non-matching document versions with ABORTED. These errors should be retried. | ||
const code = (error as FirestoreError).code; | ||
|
Uh oh!
There was an error while loading. Please reload this page.