Skip to content

Commit 0781730

Browse files
committed
AI: improving context on throwing from JSON schema helper propsMerger().
1 parent 510c7ed commit 0781730

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

express-zod-api/src/json-schema-helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const isJsonObjectSchema = (
99
const propsMerger = R.mergeDeepWith((a: unknown, b: unknown) => {
1010
if (Array.isArray(a) && Array.isArray(b)) return R.concat(a, b);
1111
if (a === b) return b;
12-
throw new Error("Can not flatten properties");
12+
throw new Error("Can not flatten properties", { cause: { a, b } });
1313
});
1414

1515
const canMerge = R.pipe(

0 commit comments

Comments
 (0)