You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(state): reject empty values cast to a scalar native type with 400
ValueCaster throws a Bad Request when an empty string is cast to a
bool/int/float native type: an empty value cannot represent the type and
must not reach the filter as a raw, untyped value (which caused
driver-specific errors such as PostgreSQL rejecting '' for an integer).
The exception is a new framework-agnostic
ApiPlatform\Metadata\Exception\BadRequestException (implements
HttpExceptionInterface, status 400); the Laravel ErrorRenderer now maps
Metadata\Exception\HttpExceptionInterface like the Symfony ErrorListener
already does.
Non-empty uncastable values are still returned unchanged so constraint
validation rejects them (422); parameters without castToNativeType keep
the empty string, so e.g. a string filter can still match it.
0 commit comments