prooph/event-store-http-api

Handle wrong usage of `head` as start

codeliner opened this issue · 0 comments

Actually, when using head as start value for a stream you get a Fatal error:

Request: http://localhost:8080/streams/Prooph%5CModel%5CUser/head

Fatal:

TypeError: Argument 2 passed to Prooph\EventStore\Adapter\PDO\PDOStreamIterator::buildStatement() must be of the type integer, float given, called in /var/www/vendor/prooph/event-store-pdo-adapter/src/PDOStreamIterator.php on line 142 and defined in /var/www/vendor/prooph/event-store-pdo-adapter/src/PDOStreamIterator.php:196

head only works together with direction backward
Request: http://localhost:8080/streams/Prooph%5CModel%5CUser/head/backward

So the service should return a 400 bad request with an appropriate message