From 991db8acb46d636afadc0d25fa7265e83b6c63b4 Mon Sep 17 00:00:00 2001 From: Rafal Walczyna Date: Tue, 23 Mar 2021 15:32:25 +0100 Subject: [PATCH] [ML][single] Change InvalidValues to TypeMismatch In case when no arguments are provided, TypeMismatch should be thrown. Verification: Tested in google chrome console. Change-Id: Iab1f606c8a731c096dd93f5e38b0ec4c9b6beb6f Signed-off-by: Rafal Walczyna --- src/ml/js/ml_common.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ml/js/ml_common.js b/src/ml/js/ml_common.js index 9040d018..2d3bd31a 100755 --- a/src/ml/js/ml_common.js +++ b/src/ml/js/ml_common.js @@ -263,14 +263,14 @@ TensorsData.prototype.setTensorRawData = function() { if (!argsIndex.has.index) { throw new WebAPIException( - WebAPIException.INVALID_VALUES_ERR, + WebAPIException.TYPE_MISMATCH_ERR, 'Invalid parameter: index is undefined' ); } if (arguments.length < 2) { throw new WebAPIException( - WebAPIException.INVALID_VALUES_ERR, + WebAPIException.TYPE_MISMATCH_ERR, 'Invalid parameter: buffer is undefined' ); } -- 2.34.1