Skip to content

Commit 760b6af

Browse files
committed
Log errors showing commands
1 parent c84bc0d commit 760b6af

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/adapters/common.js

+12
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ exports.create = function (record, data, options) {
7171
}
7272
return record
7373
})
74+
.catch(err => {
75+
console.error(insertCommand, err)
76+
throw err
77+
})
7478
}
7579

7680
exports.update = function (record, data, options) {
@@ -169,6 +173,10 @@ exports.update = function (record, data, options) {
169173
}
170174
return record
171175
})
176+
.catch(err => {
177+
console.error(updateCommand, err)
178+
throw err
179+
})
172180
}
173181

174182
exports.destroy = function (data, options) {
@@ -215,6 +223,10 @@ exports.destroy = function (data, options) {
215223
)
216224
return recordset.length
217225
})
226+
.catch(err => {
227+
console.error(deleteCommand, err)
228+
throw err
229+
})
218230
}
219231

220232
function checkRecordsetLength(data, key, n, type) {

0 commit comments

Comments
 (0)