rethinkdb-ts
rethinkdb-ts copied to clipboard
ValueChange Missing Field 'error'
According to the insert()
documentation:
Documents in
changes
for which an error occurs (such as a key conflict) will have a third field,error
, with an explanation of the error.
It seems that ValueChange
currently lacks this in the type definitions.
The fix would seem to be very minor: simply add to ValueChange
a third optional property, error
.
I couldn't reproduce this error field. tried listening to a table that got a conflict error and I got nothing in the "changes" feed...
I encountered the field during my use of forEach()
.
To be clear, this is the changes
field of an insert()
result object.
Found it, returnChanges
should be "always"
for me to see it.