Both error codes 2021 and 2023 have the same name "transaction_read_only"

While updating the list of error codes, I see that both errors 2021 and 2023 have the same transaction_read_only label: https://apple.github.io/foundationdb/api-error-codes.html

This makes it difficult to use enums to model these, and I’ll have to change the name of one or the other.

Is this normal? It looks like 2021 could probably have an additional word in it (since it seems to go along with 2020 that seems to be when trying to get the commit version of a transaction)

That looks like an error in the documentation. In the source code, 2021 is named no_commit_version:

I’ll fix the documentation.