EventStore-Client-NodeJS
EventStore-Client-NodeJS copied to clipboard
Trying to append an event with wrong id results in UnknownError
After calling appendToStream method with an id which is not a uuid, I get this error:
UnknownError: Could not recognize BadRequest
I was in situations where it took a long until I realized I was passing a wrong id through my app. I suggest having a validator on input, so we don't send such requests to EventStore at all (instead we can throw something like InvalidIdException.
I really like to make a PR for id validation, along with related tests if everyone agrees on such a fix.
Hi @Imanghvs thank you for reporting this issue and agree with you to provide a better error. Please go ahead and submit a fix and we'll review it.