FriendsOfOuro / geteventstore-php-core

PHP Client for Event Store HTTP API
http://friendsofouro.github.io/geteventstore-php-core/
MIT License
67 stars 24 forks source link

writeToStream lacks support for other transport error types #47

Open mscmorris opened 7 years ago

mscmorris commented 7 years ago

The only error check is:

if (ResponseCode::HTTP_BAD_REQUEST == $responseStatusCode) { throw new WrongExpectedVersionException(); }

However, while running against an EventStore cluster Guzzle is failing to redirect properly and returning 500. By not handling this, it looked like the write call was successful when it was not.

dbellettini commented 7 years ago

hello @mscmorris I'm really busy in these months. I would really appreciate a pull request