Skip to content

Commit cf8b00e

Browse files
committed
[form-builder] Minor: fix misleading error messsage
1 parent ee1a4dd commit cf8b00e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/@sanity/form-builder/src/patch/primitive.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default function apply(value, patch) {
3131
}
3232

3333
if (patch.path.length > 0) {
34-
throw new Error(`Default container cannot apply deep operations. Received patch with type "${patch.type}" and path "${patch.path.join('.')}"`)
34+
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)}"`)
3535
}
3636

3737
return OPERATIONS[patch.type](value, patch.value)

0 commit comments

Comments
 (0)