Skip to content

UnexpectedValueException on bad DateTime value #788

@gpenverne

Description

@gpenverne

On an entity DateTime nullable field (with column type="datetime"), sending an invalid datetime (like "invalid-date") in PUT or POST throws an UnexpectedValueException with error code 500.

Assert is not triggered, and I think the error code should be 400.

(the exception is thrown in file Symfony\Component\Serializer\Normalizer\DateTimeNormalizer line 74)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions