Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Form] [Uid] Error on invalid uid submittedΒ #39407

Closed
@geoffrey-brier

Description

@geoffrey-brier

Symfony version(s) affected: 5.2 (symfony/uid + symfony/form)

Description
Hello,

I am using the newly shipped uid component πŸš€ (great work btw) and implementing tests.

I have :

  • a Product with a uuid as a primary key
  • a form type having a product field which is an EntityType

When I submit the form with an invalid uid, it throws an exception causing a 500 which is not really friendly.

How to reproduce

Possible Solution
Would it be possible to have the same behaviour as any other choicetype so that we can have a 400 with an invalid error message ?

Additional context
sf-uid-500

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions