From 324d3fd56232f571157708e665718fc5dc7b964f Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Sun, 1 Sep 2024 12:03:52 +0200 Subject: [PATCH] fix: improve error message --- src/api/v3/keyoxide_profile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/v3/keyoxide_profile.js b/src/api/v3/keyoxide_profile.js index ec08e0f..32bfabe 100644 --- a/src/api/v3/keyoxide_profile.js +++ b/src/api/v3/keyoxide_profile.js @@ -87,7 +87,7 @@ const doVerification = async (profile) => { const validate = (profile) => { const valid = apiProfileValidate(profile) if (!valid) { - throw new Error(`Profile data validation error: ${apiProfileValidate.errors.map(x => x.message).join(', ')}`) + throw new Error(`API data validation error: ${apiProfileValidate.errors.map(x => `${x.instancePath} ${x.message}`).join(', ')}`) } }