I just switched from version 5.x to 20.x and found a deviation when trying to delete a non-existing stream.
With version 5.x the following deletes execute without an error:
http://127.0.0.1:2113/streams/NonExisting
ES-HardDelete: false
ES-ExpectedVersion: -2 // ANY
http://127.0.0.1:2113/streams/NonExisting
ES-HardDelete: false
ES-ExpectedVersion: -1 // NO_OR_EMPTY_STREAM
With version 20.x I get an “unexpected version” error (http response 400).
The same case executed with a hard delete runs still fine (no error):
http://127.0.0.1:2113/streams/NonExisting
ES-HardDelete: true
ES-ExpectedVersion: -2 // ANY
http://127.0.0.1:2113/streams/NonExisting
ES-HardDelete: true
ES-ExpectedVersion: -1 // NO_OR_EMPTY_STREAM
I guess the soft delete on a non-existing stream should still be executed the same way as in 5.x