RPC tooBusy response has 503 HTTP status if "ripplerpc": "3.0": (#4143)

Fixes #4005

Makes it possible for internal RPC Error Codes to associate
themselves with a non-OK (200) HTTP status code.  There are
quite a number of RPC responses in addition to tooBusy that
now have non-OK HTTP status codes.

The new return HTTP return codes are only enabled by including
"ripplerpc": "3.0" or higher in the original request.
Otherwise the historical value, 200, continues to be returned.
This ensures that this is not a breaking change.
This commit is contained in:
Scott Schurr
2023-01-03 07:24:45 -10:00
committed by GitHub
parent fda9e9a7ee
commit 6f8750316c
6 changed files with 154 additions and 108 deletions

View File

@@ -1675,7 +1675,7 @@ class LedgerRPC_test : public beast::unit_test::suite
void
testLedgerAccountsOption()
{
testcase("Ledger Request, Accounts Option");
testcase("Ledger Request, Accounts Hashes");
using namespace test::jtx;
Env env{*this};