diff --git a/.gitignore b/.gitignore index e3900e7..f49b431 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ tmp covreporter/ coverage/ .tern-port +.idea diff --git a/lib/table.js b/lib/table.js index 66a96fb..b56aca7 100644 --- a/lib/table.js +++ b/lib/table.js @@ -160,6 +160,7 @@ internals.createItem = function (table, item, options, callback) { var result = self.schema.validate(data); if(result.error) { + result.error.message = result.error.message + ' on ' + self.tableName(); return callback(result.error); } @@ -674,7 +675,7 @@ internals.syncIndexes = function (table, callback) { internals.findMissingGlobalIndexes = function (table, data) { if(_.isNull(data) || _.isUndefined(data)) { - // table does not exist + // table does not exist return table.schema.globalIndexes; } else { var indexData = _.get(data, 'Table.GlobalSecondaryIndexes');