From 5da2fd57d489623bd1850e0eb20390ef8424ecd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rge=20N=C3=A6ss?= Date: Thu, 17 Aug 2017 15:49:35 +0200 Subject: [PATCH] [form-builder] Minor: fix misleading error messsage --- packages/@sanity/form-builder/src/patch/primitive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@sanity/form-builder/src/patch/primitive.js b/packages/@sanity/form-builder/src/patch/primitive.js index dd6412d1084..ad214c8daf8 100644 --- a/packages/@sanity/form-builder/src/patch/primitive.js +++ b/packages/@sanity/form-builder/src/patch/primitive.js @@ -31,7 +31,7 @@ export default function apply(value, patch) { } if (patch.path.length > 0) { - throw new Error(`Default container cannot apply deep operations. Received patch with type "${patch.type}" and path "${patch.path.join('.')}"`) + throw new Error(`Cannot apply deep operations on primitive values. Received patch with type "${patch.type}" and path "${patch.path.join('.')} that targeted the value "${JSON.stringify(value)}"`) } return OPERATIONS[patch.type](value, patch.value)