Skip to content

Commit

Permalink
Use unique log messages for insert database failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Cunningham committed Oct 16, 2018
1 parent 1cbb3ed commit abd2044
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/server/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ function init (env, ctx, server) {
console.log(LOG_DEDUP + 'Adding new record');
ctx.store.collection(collection).insert(data.data, function insertResult (err, doc) {
if (err != null && err.message) {
console.log('Data insertion error', err.message);
console.log('treatments data insertion error: ', err.message);
return;
}
if (callback) {
Expand Down Expand Up @@ -372,7 +372,7 @@ function init (env, ctx, server) {
});
ctx.store.collection(collection).insert(data.data, function insertResult (err, doc) {
if (err != null && err.message) {
console.log('Data insertion error', err.message);
console.log('devicestatus insertion error: ', err.message);
return;
}
if (callback) {
Expand All @@ -383,7 +383,7 @@ function init (env, ctx, server) {
} else {
ctx.store.collection(collection).insert(data.data, function insertResult (err, doc) {
if (err != null && err.message) {
console.log('Data insertion error', err.message);
console.log(data.collection + ' insertion error: ', err.message);
return;
}
if (callback) {
Expand Down

0 comments on commit abd2044

Please sign in to comment.