diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-12-30 09:52:52 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-12-30 16:26:35 -0400 |
commit | 97d62ac87cd8e8788cb6b04c62160aab623026c0 (patch) | |
tree | 67d9bc707f5f80fc8cace65e555566420ee93768 /src/data | |
parent | 7f39e10beee71ea0c45db3ff9b2f6d6ae383bd3b (diff) |
validators: fix validateAllPropertyValues messaging
Diffstat (limited to 'src/data')
-rw-r--r-- | src/data/things/validators.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/data/things/validators.js b/src/data/things/validators.js index d881aac2..7289b6d7 100644 --- a/src/data/things/validators.js +++ b/src/data/things/validators.js @@ -402,7 +402,9 @@ export function validateAllPropertyValues(validator) { try { validator(value); } catch (error) { - error.message = `(key: ${colors.green(key)}, value: ${inspect(value)}) ${error.message}`; + const keyPart = colors.green(key.toString()); + const valuePart = inspect(value); + error.message = `(key: ${keyPart}, value: ${valuePart}) ${error.message}`; throw error; } }); |