From f553b2ce5048e824b66817de1708899874b702ef Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Tue, 17 Dec 2024 11:17:04 -0800 Subject: [PATCH] tune wording Signed-off-by: Tyler Ohlsen --- public/utils/config_to_schema_utils.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/public/utils/config_to_schema_utils.ts b/public/utils/config_to_schema_utils.ts index 30862f72..3d3b3c98 100644 --- a/public/utils/config_to_schema_utils.ts +++ b/public/utils/config_to_schema_utils.ts @@ -175,14 +175,18 @@ export function getFieldSchema( } } ) - .test('jsonArray', `Too large`, (value) => { - try { - // @ts-ignore - return new TextEncoder().encode(value)?.length < MAX_BYTES; - } catch (error) { - return false; + .test( + 'jsonArray', + `Too large. Exceeds OpenSearch Dashboards limit of ${MAX_BYTES} bytes.`, + (value) => { + try { + // @ts-ignore + return new TextEncoder().encode(value)?.length < MAX_BYTES; + } catch (error) { + return false; + } } - }); + ); break; } case 'jsonString': {