« get me outta code hell

data: valdiateArrayItems: use same index formatting as other errors - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-08-21 22:13:08 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-08-21 22:13:08 -0300
commitb90c2072f1ef8f55ef495bfa3920af4bb482f0cd (patch)
tree54d750814e1f1131faaa6d6328f85d0ada7f3ecf
parent93fd751aeb3a9c0b60889db0073e7907c87f90fe (diff)
data: valdiateArrayItems: use same index formatting as other errors
Specifically, the same as decorateErrorWithIndex.
-rw-r--r--src/data/things/validators.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/data/things/validators.js b/src/data/things/validators.js
index fc953c2a..5748eacf 100644
--- a/src/data/things/validators.js
+++ b/src/data/things/validators.js
@@ -174,7 +174,7 @@ function validateArrayItemsHelper(itemValidator) {
         throw new Error(`Expected validator to return true`);
       }
     } catch (error) {
-      error.message = `(index: ${color.green(index)}, item: ${inspect(item)}) ${error.message}`;
+      error.message = `(index: ${color.yellow(`#${index}`)}, item: ${inspect(item)}) ${error.message}`;
       throw error;
     }
   };