Skip to content

Commit 3ed31f0

Browse files
committed
fix: convert forwarded Zod issues to custom type in relationship validation
1 parent e10f1ab commit 3ed31f0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/schemas/sro/relationship.schema.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,12 @@ export function createRelationshipValidationRefinement() {
268268
const [targetType] = ctx.value.target_ref.split('--') as [StixType];
269269

270270
isValidRelationship(sourceType, ctx.value.relationship_type, targetType, (issue) => {
271-
ctx.issues.push(issue);
271+
ctx.issues.push({
272+
code: 'custom',
273+
message: issue.message,
274+
path: issue.path,
275+
input: issue.input,
276+
});
272277
});
273278
};
274279
}

0 commit comments

Comments
 (0)