Skip to content

[Form] Rethrow/log transformation exception #5607

Closed
@rcambrj

Description

@rcambrj

If a Transformer throws a TransformationFailedException, the details of this exception are lost.

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Form.php line 592:

        } catch (TransformationFailedException $e) {
            $this->synchronized = false;
        }

The exception code+message should probably be kept and displayed.

Instead, the error becomes "This value is not valid.". I've not been able to find out how, but this message occurs in:
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php

Related:
#4860
#703

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureFormGood first issueIdeal for your first contribution! (some Symfony experience may be required)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions