XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.51k stars 1.46k forks source link

Inconsistent error messages - "lgrNotFound" and "ledgerNotFound" #3654

Open carlhua opened 3 years ago

carlhua commented 3 years ago

An RPC command could return two different error messages meaning the same thing, either ledgerNotFound or lgrNotFound. There are also some unit tests that care about these values. In addition, it seems that the improved ledger_request response switched from "ledgerNotFound" to "lgrNotFound". We should consolidate these to use the same error.

Here are some examples of inconsistency:

https://github.com/ripple/rippled/blob/0b4e34b03b72196510998375fd28622c8b63aaa7/src/ripple/protocol/impl/ErrorCodes.cpp#L83

https://github.com/ripple/rippled/blob/0b4e34b03b72196510998375fd28622c8b63aaa7/src/ripple/rpc/handlers/CanDelete.cpp#L83

Exported from RIPD-1080

intelliot commented 1 year ago

This may be something to clean up in Clio