From e035f24219b2f3637a7ff37bda84d24249b5eb7a Mon Sep 17 00:00:00 2001 From: Owen Pearson Date: Mon, 28 Feb 2022 14:36:51 +0000 Subject: [PATCH] Throw ErrorInfo when invalid key supplied --- common/lib/client/rest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/client/rest.ts b/common/lib/client/rest.ts index 39592f191c..40fad6483d 100644 --- a/common/lib/client/rest.ts +++ b/common/lib/client/rest.ts @@ -52,7 +52,7 @@ class Rest { if(!keyMatch) { const msg = 'invalid key parameter'; Logger.logAction(Logger.LOG_ERROR, 'Rest()', msg); - throw new Error(msg); + throw new ErrorInfo(msg, 40400, 404); } normalOptions.keyName = keyMatch[1]; normalOptions.keySecret = keyMatch[2];