mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
test: Env unit test RPC errors return a unique result: (#4877)
* telENV_RPC_FAILED is a new code, reserved exclusively for unit tests when RPC fails. This will make those types of errors distinct and easier to test for when expected and/or diagnose when not. * Output RPC command result when result is not expected.
This commit is contained in:
@@ -64,7 +64,8 @@ enum TELcodes : TERUnderlyingType {
|
||||
telCAN_NOT_QUEUE_FULL,
|
||||
telWRONG_NETWORK,
|
||||
telREQUIRES_NETWORK_ID,
|
||||
telNETWORK_ID_MAKES_TX_NON_CANONICAL
|
||||
telNETWORK_ID_MAKES_TX_NON_CANONICAL,
|
||||
telENV_RPC_FAILED
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -154,6 +154,7 @@ transResults()
|
||||
MAKE_ERROR(telWRONG_NETWORK, "Transaction specifies a Network ID that differs from that of the local node."),
|
||||
MAKE_ERROR(telREQUIRES_NETWORK_ID, "Transactions submitted to this node/network must include a correct NetworkID field."),
|
||||
MAKE_ERROR(telNETWORK_ID_MAKES_TX_NON_CANONICAL, "Transactions submitted to this node/network must NOT include a NetworkID field."),
|
||||
MAKE_ERROR(telENV_RPC_FAILED, "Unit test RPC failure."),
|
||||
|
||||
MAKE_ERROR(temMALFORMED, "Malformed transaction."),
|
||||
MAKE_ERROR(temBAD_AMM_TOKENS, "Malformed: Invalid LPTokens."),
|
||||
|
||||
Reference in New Issue
Block a user