[Form] Improved exception message if the data class is not found

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #12359
| License       | MIT
| Doc PR        | -
Thanks, fixed. We'll adapt the 2.5 error message once this is merged.