From 7b90b6a287879a0981a92fa5fadc9a3e98f5d5a9 Mon Sep 17 00:00:00 2001 From: Takuya Ono Date: Sun, 7 May 2023 18:15:55 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(config.ts):=20error=20messag?= =?UTF-8?q?e=20for=20OPENAI=5FBASE=5FPATH=20validation=20(#164)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The error message for the OPENAI_BASE_PATH validation has been updated to be more descriptive and helpful. The message now reads "Must be string" instead of "${value} is not supported yet". This change improves the clarity of the error message and makes it easier for developers to understand what went wrong when the validation fails. --- src/commands/config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/config.ts b/src/commands/config.ts index 9f16034..ed8228c 100644 --- a/src/commands/config.ts +++ b/src/commands/config.ts @@ -96,8 +96,8 @@ export const configValidators = { [CONFIG_KEYS.OPENAI_BASE_PATH](value: any) { validateConfig( CONFIG_KEYS.OPENAI_BASE_PATH, - typeof value == 'string', - `${value} is not supported yet` + typeof value === 'string', + 'Must be string' ); return value; },