@autofleet/sequelize-utils 5.1.6 → 5.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ exports.default = (sequelize) => {
|
|
|
20
20
|
return transValue;
|
|
21
21
|
}
|
|
22
22
|
catch (e) {
|
|
23
|
-
if (e instanceof sequelize_1.DatabaseError) {
|
|
23
|
+
if (e instanceof sequelize_1.DatabaseError || e?.constructor?.name === 'DatabaseError') {
|
|
24
24
|
if (retriesCount === 0) {
|
|
25
25
|
log('error inside transactionWithRetry - will stop retry', e);
|
|
26
26
|
throw e;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -22,7 +22,7 @@ export default (sequelize: Sequelize): {
|
|
|
22
22
|
});
|
|
23
23
|
return transValue;
|
|
24
24
|
} catch (e) {
|
|
25
|
-
if (e instanceof DatabaseError) {
|
|
25
|
+
if (e instanceof DatabaseError || e?.constructor?.name === 'DatabaseError') {
|
|
26
26
|
if (retriesCount === 0) {
|
|
27
27
|
log('error inside transactionWithRetry - will stop retry', e);
|
|
28
28
|
throw e;
|