File tree Expand file tree Collapse file tree
src/Adapters/Storage/Mongo Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,7 +32,9 @@ const MongoSchemaCollectionName = '_SCHEMA';
3232 * (connection pool, network, server selection) as opposed to a query-level error.
3333 */
3434function isTransientError ( error ) {
35- if ( ! error ) return false ;
35+ if ( ! error ) {
36+ return false ;
37+ }
3638
3739 // Connection pool, network, and server selection errors
3840 const transientErrorNames = [
@@ -41,11 +43,15 @@ function isTransientError(error) {
4143 'MongoNetworkTimeoutError' ,
4244 'MongoNetworkError' ,
4345 ] ;
44- if ( transientErrorNames . includes ( error . name ) ) return true ;
46+ if ( transientErrorNames . includes ( error . name ) ) {
47+ return true ;
48+ }
4549
4650 // Check for MongoDB's transient transaction error label
4751 if ( typeof error . hasErrorLabel === 'function' ) {
48- if ( error . hasErrorLabel ( 'TransientTransactionError' ) ) return true ;
52+ if ( error . hasErrorLabel ( 'TransientTransactionError' ) ) {
53+ return true ;
54+ }
4955 }
5056
5157 return false ;
You can’t perform that action at this time.
0 commit comments