Skip to content

Commit 339e87c

Browse files
committed
Fix error message for invalid use of SODA metaData
1 parent c99d478 commit 339e87c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/sodaDatabase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function createCollection(name, a2, a3) {
4949
createCollCb = a3;
5050
if (options.metaData) {
5151
if (!nodbUtil.isObject(options.metaData)) {
52-
createCollCb(Error(nodbUtil.getErrorMessage('NJS-006', 3)));
52+
createCollCb(Error(nodbUtil.getErrorMessage('NJS-006', 2)));
5353
return;
5454
}
5555
options.metaData = JSON.stringify(options.metaData);

test/soda1.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ describe('164. soda1.js', () => {
433433

434434
await sodaUtil.assertThrowsAsync(
435435
async () => await sd.createCollection(t_collname, options),
436-
/NJS-006: invalid type for parameter 3/
436+
/NJS-006:/
437437
);
438438

439439
} catch(err) {
@@ -449,4 +449,4 @@ describe('164. soda1.js', () => {
449449
}
450450
}); // 164.11
451451

452-
});
452+
});

0 commit comments

Comments
 (0)