UnexpectedStorageResponseException for duplicates with CosmosDB emulator
lethek opened this issue · comments
I've been trying the example scenarios from this repo with the CosmosDB Emulator. However, I have not yet tried it with the real CosmosDB.
When I got to the S09_Handling_duplicates scenario, an UnexpectedStorageResponseException
was thrown by Streamstone.Stream.WriteOperation.Batch.ParseConflictingEntityPosition
with the message "Unexpected Table Storage response. Details: Conflict exception message should have exactly 3 lines".
The exception's wrapped Error.ErrorMessage string looks okay to me except that it's actually 4 lines rather than 3 because it has a trailing new-line character on the end.
4:The specified entity already exists.
RequestID:e1be4a0d-1abd-4df2-be6f-bb71d35cfb5f
So we just need to trim trailing newline before check, right?
Can you do a PR on this?
I believe so. I'm happy to give it a try making a PR a bit later today.