Effect CommunityEC
Effect Community3y ago
132 replies
Khalid Jebbari

Error message for incorrect `startDate`

The error message when startDate is wrong:

 json
{
    "error": {
        "_tag": "ParseError",
        "errors": [
            {
                "_tag": "Key",
                "key": "startDate",
                "errors": [
                    {
                        "_tag": "Type",
                        "expected": {
                            "_tag": "Refinement",
                            "from": {
                                "_tag": "Declaration",
                                "typeParameters": [],
                                "type": {
                                    "_tag": "TypeLiteral",
                                    "propertySignatures": [],
                                    "indexSignatures": [],
                                    "annotations": {}
                                },
                                "annotations": {
                                    "@effect/schema/IdentifierAnnotationId": "Date"
                                }
                            },
                            "isReversed": false,
                            "annotations": {
                                "@effect/schema/TypeAnnotationId": "@effect/schema/ValidDateTypeId",
                                "@effect/schema/DescriptionAnnotationId": "a valid Date"
                            }
                        },
                        "actual": null,
                        "message": {
                            "_tag": "None"
                        }
                    }
                ]
            }
        ]
    },
    "_tag": "PersonProcessingError"
}
Was this page helpful?