Mini-ghost/vorms

parseErrorSchema with union will lose the error

unlinking opened this issue · 0 comments

Describe the bug

Since union does not have a path, the error is discarded.

[
    {
        "reason": "type",
        "validation": "union",
        "origin": "value",
        "message": "Invalid type",
        "input": {
            "type": "image"
        },
        "issues": [
            {
                "reason": "type",
                "validation": "literal",
                "origin": "value",
                "message": "Invalid type",
                "input": "image",
                "path": [
                    {
                        "schema": "object",
                        "input": {
                            "type": "image"
                        },
                        "key": "type",
                        "value": "image"
                    }
                ]
            }
        ]
    }
]

Reproduction

todo

Steps to reproduce

No response