EventStore / EventStore-Client-NodeJS

A NodeJS client for Event Store
https://eventstore.com
Apache License 2.0
162 stars 22 forks source link

appendToStream with expectedRevision -1 causes cryptic error #348

Open rmp613 opened 1 year ago

rmp613 commented 1 year ago

Describe the bug Very similar to https://github.com/EventStore/EventStore/issues/2781

I get Request message serialization failure: Cannot read property 'lo' of null when attempting to appendToStream with -1 expectedRevision To Reproduce Steps to reproduce the behavior:

  1. call appendToStream with -1 expectedRevision

Expected behavior A less cryptic error so the user can fix the issue

Actual behavior A cryptic grpc error is thrown

Config/Logs/Screenshots

EventStore details

DB-492

rmp613 commented 1 year ago

Whoops, can do tomorrow morning

On Tue, 7 Nov 2023 at 9:41 pm, Alexey Zimarev @.***> wrote:

Can you move the issue to the NodeJS client repo?

— Reply to this email directly, view it on GitHub https://github.com/EventStore/EventStore-Client-NodeJS/issues/348, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFZTITAWFMJNNZ7TEYSYXDYDIF7LAVCNFSM6AAAAAA7ASL7BSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJYGI2TCMBUGU . You are receiving this because you authored the thread.Message ID: @.***>

alexeyzimarev commented 1 year ago

The current version of NodeJS client doesn't allow setting -1 as the expected revision, cloud you clarify what you are actually doing? Also, server version 6.0.0 is confusing as it doesn't exist.

riordanpawley commented 1 year ago

The current version of NodeJS client doesn't allow setting -1 as the expected revision, cloud you clarify what you are actually doing? Also, server version 6.0.0 is confusing as it doesn't exist.

Thanks for moving it, I forgot sorry. Client version 6.0.0. Server version 23.10.0 I understand -1 is not a valid input but the types allow it and the error thrown is very hard to debug as an end user of the library.

w1am commented 1 year ago

@riordanpawley This issue is already being addressed in this pull request #349

riordanpawley commented 1 year ago

@riordanpawley This issue is already being addressed in this pull request #349

OK Happy to close then :)