This commit is contained in:
bthomee
2025-03-11 18:21:06 +00:00
parent 95e4a9d650
commit 4ba075f689
2527 changed files with 275798 additions and 275583 deletions

View File

@@ -96,225 +96,229 @@ $(function() {
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">//==============================================================================</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include &lt;xrpl/beast/utility/instrumentation.h&gt;</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include &lt;xrpl/protocol/ErrorCodes.h&gt;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include &lt;<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/array.html">array</a>&gt;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#include &lt;<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/stdexcept.html">stdexcept</a>&gt;</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include &lt;xrpl/json/json_value.h&gt;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include &lt;xrpl/protocol/ErrorCodes.h&gt;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#include &lt;xrpl/protocol/jss.h&gt;</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceripple.html">ripple</a> {</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="keyword">namespace </span>RPC {</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC_1_1detail.html"> 28</a></span><span class="keyword">namespace </span>detail {</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="comment">// Unordered array of ErrorInfos, so we don&#39;t have to maintain the list</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="comment">// ordering by hand.</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="comment">//</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="comment">// This array will be omitted from the object file; only the sorted version</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="comment">// will remain in the object file. But the string literals will remain.</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="comment">//</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="comment">// There&#39;s a certain amount of tension in determining the correct HTTP</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="comment">// status to associate with a given RPC error. Initially all RPC errors</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="comment">// returned 200 (OK). And that&#39;s the default behavior if no HTTP status code</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="comment">// is specified below.</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="comment">//</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="comment">// The codes currently selected target the load balancer fail-over use case.</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="comment">// If a query fails on one node but is likely to have a positive outcome</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="comment">// on a different node, then the failure should return a 4xx/5xx range</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="comment">// status code.</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="comment">// clang-format off</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC_1_1detail.html#ae8de80620fff9de55ec0ddb5775c26b8"> 47</a></span><span class="keyword">constexpr</span> <span class="keyword">static</span> <a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#ae8de80620fff9de55ec0ddb5775c26b8">unorderedErrorInfos</a>[]{</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a4fba57dbbed9bfaa196e1a0e0915dc8a">rpcACT_MALFORMED</a>, <span class="stringliteral">&quot;actMalformed&quot;</span>, <span class="stringliteral">&quot;Account malformed.&quot;</span>},</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a044301ed3c32624aade5888d1c60566f">rpcACT_NOT_FOUND</a>, <span class="stringliteral">&quot;actNotFound&quot;</span>, <span class="stringliteral">&quot;Account not found.&quot;</span>},</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a63fd0c00dcecf06df448bf7eddf6bd8c">rpcALREADY_MULTISIG</a>, <span class="stringliteral">&quot;alreadyMultisig&quot;</span>, <span class="stringliteral">&quot;Already multisigned.&quot;</span>},</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a11b93b10f2466e402c74aa4a9b5cb2f7">rpcALREADY_SINGLE_SIG</a>, <span class="stringliteral">&quot;alreadySingleSig&quot;</span>, <span class="stringliteral">&quot;Already single-signed.&quot;</span>},</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a1c4319d23e52800c6dc951ed7d343cea">rpcAMENDMENT_BLOCKED</a>, <span class="stringliteral">&quot;amendmentBlocked&quot;</span>, <span class="stringliteral">&quot;Amendment blocked, need upgrade.&quot;</span>, 503},</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a7a140417a251408888375e3b6c0cfcd5">rpcEXPIRED_VALIDATOR_LIST</a>, <span class="stringliteral">&quot;unlBlocked&quot;</span>, <span class="stringliteral">&quot;Validator list expired.&quot;</span>, 503},</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a19bc14d53a84c5b1d5c1693aa0e9e317">rpcATX_DEPRECATED</a>, <span class="stringliteral">&quot;deprecated&quot;</span>, <span class="stringliteral">&quot;Use the new API or specify a ledger range.&quot;</span>, 400},</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a5b391b66e90a1cb080cf29d83141853d">rpcBAD_KEY_TYPE</a>, <span class="stringliteral">&quot;badKeyType&quot;</span>, <span class="stringliteral">&quot;Bad key type.&quot;</span>, 400},</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a5a9afe2f583b5c5e615979d14c00e7bd">rpcBAD_FEATURE</a>, <span class="stringliteral">&quot;badFeature&quot;</span>, <span class="stringliteral">&quot;Feature unknown or invalid.&quot;</span>, 500},</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a06d57c943aeb0aff8b6d87d64cbcfa04">rpcBAD_ISSUER</a>, <span class="stringliteral">&quot;badIssuer&quot;</span>, <span class="stringliteral">&quot;Issuer account malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a64f2f624cc4844b4907be821dccabbd9">rpcBAD_MARKET</a>, <span class="stringliteral">&quot;badMarket&quot;</span>, <span class="stringliteral">&quot;No such market.&quot;</span>, 404},</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a888a186bc5ae79d68140783e22298394">rpcBAD_SECRET</a>, <span class="stringliteral">&quot;badSecret&quot;</span>, <span class="stringliteral">&quot;Secret does not match account.&quot;</span>, 403},</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ad2f8f023342d32f2602688202894cabe">rpcBAD_SEED</a>, <span class="stringliteral">&quot;badSeed&quot;</span>, <span class="stringliteral">&quot;Disallowed seed.&quot;</span>, 403},</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a89a147d7376535a497c85024dabc9167">rpcBAD_SYNTAX</a>, <span class="stringliteral">&quot;badSyntax&quot;</span>, <span class="stringliteral">&quot;Syntax error.&quot;</span>, 400},</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aa67c34c5d359f52c3f1fdcf2ce06dbc9">rpcCHANNEL_MALFORMED</a>, <span class="stringliteral">&quot;channelMalformed&quot;</span>, <span class="stringliteral">&quot;Payment channel is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a60badd0db2ef5b154d6101fe7b845e39">rpcCHANNEL_AMT_MALFORMED</a>, <span class="stringliteral">&quot;channelAmtMalformed&quot;</span>, <span class="stringliteral">&quot;Payment channel amount is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ab86d56c66edde43e490eec3de23deb47">rpcCOMMAND_MISSING</a>, <span class="stringliteral">&quot;commandMissing&quot;</span>, <span class="stringliteral">&quot;Missing command entry.&quot;</span>, 400},</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aec50f1af38ef002318ef8f19ca27560c">rpcDB_DESERIALIZATION</a>, <span class="stringliteral">&quot;dbDeserialization&quot;</span>, <span class="stringliteral">&quot;Database deserialization error.&quot;</span>, 502},</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ac88bf3c7097096c5ed0fc4d354e91950">rpcDST_ACT_MALFORMED</a>, <span class="stringliteral">&quot;dstActMalformed&quot;</span>, <span class="stringliteral">&quot;Destination account is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a04a908ae049e097e9e7896ba3deef874">rpcDST_ACT_MISSING</a>, <span class="stringliteral">&quot;dstActMissing&quot;</span>, <span class="stringliteral">&quot;Destination account not provided.&quot;</span>, 400},</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aec93776d4f8dd6d4dac1ac2a447d196a">rpcDST_ACT_NOT_FOUND</a>, <span class="stringliteral">&quot;dstActNotFound&quot;</span>, <span class="stringliteral">&quot;Destination account not found.&quot;</span>, 404},</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ab2d46f2d2f48b9b2a69a3dd7900c2095">rpcDST_AMT_MALFORMED</a>, <span class="stringliteral">&quot;dstAmtMalformed&quot;</span>, <span class="stringliteral">&quot;Destination amount/currency/issuer is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ae21a94cfc5c7f48c1bdf6fd45b21e88b">rpcDST_AMT_MISSING</a>, <span class="stringliteral">&quot;dstAmtMissing&quot;</span>, <span class="stringliteral">&quot;Destination amount/currency/issuer is missing.&quot;</span>, 400},</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a7eec43248b5e3342fa6ff1fcf9976519">rpcDST_ISR_MALFORMED</a>, <span class="stringliteral">&quot;dstIsrMalformed&quot;</span>, <span class="stringliteral">&quot;Destination issuer is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a17eb7d1bbf2edda8e901174203e1e824">rpcEXCESSIVE_LGR_RANGE</a>, <span class="stringliteral">&quot;excessiveLgrRange&quot;</span>, <span class="stringliteral">&quot;Ledger range exceeds 1000.&quot;</span>, 400},</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932abbd1895751c150ad43066e45683a3a6a">rpcFORBIDDEN</a>, <span class="stringliteral">&quot;forbidden&quot;</span>, <span class="stringliteral">&quot;Bad credentials.&quot;</span>, 403},</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ae44751c9b253c3b447721a315c5525c7">rpcHIGH_FEE</a>, <span class="stringliteral">&quot;highFee&quot;</span>, <span class="stringliteral">&quot;Current transaction fee exceeds your limit.&quot;</span>, 402},</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a839833d48b635d8df6a9176274ae922f">rpcINTERNAL</a>, <span class="stringliteral">&quot;internal&quot;</span>, <span class="stringliteral">&quot;Internal error.&quot;</span>, 500},</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a2a99d997786c15b8688fdcd6242d386f">rpcINVALID_LGR_RANGE</a>, <span class="stringliteral">&quot;invalidLgrRange&quot;</span>, <span class="stringliteral">&quot;Ledger range is invalid.&quot;</span>, 400},</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a82ddebc5ec7a37ff38892487277bf9c4">rpcINVALID_PARAMS</a>, <span class="stringliteral">&quot;invalidParams&quot;</span>, <span class="stringliteral">&quot;Invalid parameters.&quot;</span>, 400},</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ad2a733704a1bd3f6f03e451baf23fc53">rpcINVALID_HOTWALLET</a>, <span class="stringliteral">&quot;invalidHotWallet&quot;</span>, <span class="stringliteral">&quot;Invalid hotwallet.&quot;</span>, 400},</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a13cb05bfc011d1eec5fa52b5a3417043">rpcISSUE_MALFORMED</a>, <span class="stringliteral">&quot;issueMalformed&quot;</span>, <span class="stringliteral">&quot;Issue is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ac1a6dff600f246dd125ce9d6d02eeeba">rpcJSON_RPC</a>, <span class="stringliteral">&quot;json_rpc&quot;</span>, <span class="stringliteral">&quot;JSON-RPC transport error.&quot;</span>, 500},</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a9523d81ad23bb880bc9169950a780501">rpcLGR_IDXS_INVALID</a>, <span class="stringliteral">&quot;lgrIdxsInvalid&quot;</span>, <span class="stringliteral">&quot;Ledger indexes invalid.&quot;</span>, 400},</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ab6f7ca2b4e8b89a35acdbda0e1af8985">rpcLGR_IDX_MALFORMED</a>, <span class="stringliteral">&quot;lgrIdxMalformed&quot;</span>, <span class="stringliteral">&quot;Ledger index malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a94c06165d2c9835fabfdb7388b68d376">rpcLGR_NOT_FOUND</a>, <span class="stringliteral">&quot;lgrNotFound&quot;</span>, <span class="stringliteral">&quot;Ledger not found.&quot;</span>, 404},</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a3df7a80b8a138b99a8e0723d2364d798">rpcLGR_NOT_VALIDATED</a>, <span class="stringliteral">&quot;lgrNotValidated&quot;</span>, <span class="stringliteral">&quot;Ledger not validated.&quot;</span>, 202},</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a55f16b6766448484475fc0f2db63d92b">rpcMASTER_DISABLED</a>, <span class="stringliteral">&quot;masterDisabled&quot;</span>, <span class="stringliteral">&quot;Master key is disabled.&quot;</span>, 403},</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ac6b74149815b431c392a0538b5df7b39">rpcNOT_ENABLED</a>, <span class="stringliteral">&quot;notEnabled&quot;</span>, <span class="stringliteral">&quot;Not enabled in configuration.&quot;</span>, 501},</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a9a898f996bdd8a3b2e718444d86e1640">rpcNOT_IMPL</a>, <span class="stringliteral">&quot;notImpl&quot;</span>, <span class="stringliteral">&quot;Not implemented.&quot;</span>, 501},</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a6ec49deb0783b06f293634d38eb407b9">rpcNOT_READY</a>, <span class="stringliteral">&quot;notReady&quot;</span>, <span class="stringliteral">&quot;Not ready to handle this request.&quot;</span>, 503},</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a0d6de5ceef1ebe6f65e14a7561563550">rpcNOT_SUPPORTED</a>, <span class="stringliteral">&quot;notSupported&quot;</span>, <span class="stringliteral">&quot;Operation not supported.&quot;</span>, 501},</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932abc5ca87666d140c5f56880e7a7448773">rpcNO_CLOSED</a>, <span class="stringliteral">&quot;noClosed&quot;</span>, <span class="stringliteral">&quot;Closed ledger is unavailable.&quot;</span>, 503},</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a74511028d6a24bc8826f5fc70ca61ef5">rpcNO_CURRENT</a>, <span class="stringliteral">&quot;noCurrent&quot;</span>, <span class="stringliteral">&quot;Current ledger is unavailable.&quot;</span>, 503},</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932af301bbeaf5fcfb44db08132e6eae4ac2">rpcNOT_SYNCED</a>, <span class="stringliteral">&quot;notSynced&quot;</span>, <span class="stringliteral">&quot;Not synced to the network.&quot;</span>, 503},</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a02193610b83aaaae66347f6236dcf995">rpcNO_EVENTS</a>, <span class="stringliteral">&quot;noEvents&quot;</span>, <span class="stringliteral">&quot;Current transport does not support events.&quot;</span>, 405},</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a128bdc6241c00a1d4486399d304c2d28">rpcNO_NETWORK</a>, <span class="stringliteral">&quot;noNetwork&quot;</span>, <span class="stringliteral">&quot;Not synced to the network.&quot;</span>, 503},</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932af84f0f070938fb2e6bfc21dd28e98c5c">rpcNO_PERMISSION</a>, <span class="stringliteral">&quot;noPermission&quot;</span>, <span class="stringliteral">&quot;You don&#39;t have permission for this command.&quot;</span>, 401},</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aaa66891292b88906637528756e064d1e">rpcNO_PF_REQUEST</a>, <span class="stringliteral">&quot;noPathRequest&quot;</span>, <span class="stringliteral">&quot;No pathfinding request in progress.&quot;</span>, 404},</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a6b62321701dd9bdac951e62cf9a478a5">rpcOBJECT_NOT_FOUND</a>, <span class="stringliteral">&quot;objectNotFound&quot;</span>, <span class="stringliteral">&quot;The requested object was not found.&quot;</span>, 404},</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a78e5ffef07cc85fedafde770039313bc">rpcPUBLIC_MALFORMED</a>, <span class="stringliteral">&quot;publicMalformed&quot;</span>, <span class="stringliteral">&quot;Public key is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a70a773ee3a341f5704835d3276b814a0">rpcSENDMAX_MALFORMED</a>, <span class="stringliteral">&quot;sendMaxMalformed&quot;</span>, <span class="stringliteral">&quot;SendMax amount malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a9e3a3fa2bb1e04da92ea7253db9189d3">rpcSIGNING_MALFORMED</a>, <span class="stringliteral">&quot;signingMalformed&quot;</span>, <span class="stringliteral">&quot;Signing of transaction is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a55a275d2d3a5e83d075c30650592949d">rpcSLOW_DOWN</a>, <span class="stringliteral">&quot;slowDown&quot;</span>, <span class="stringliteral">&quot;You are placing too much load on the server.&quot;</span>, 429},</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a967859223f75630b2c78876fca0c0436">rpcSRC_ACT_MALFORMED</a>, <span class="stringliteral">&quot;srcActMalformed&quot;</span>, <span class="stringliteral">&quot;Source account is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932afff1867365ccf8f1661c8d796c93ef4c">rpcSRC_ACT_MISSING</a>, <span class="stringliteral">&quot;srcActMissing&quot;</span>, <span class="stringliteral">&quot;Source account not provided.&quot;</span>, 400},</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a45e21d134aa6921065916fcbcb875877">rpcSRC_ACT_NOT_FOUND</a>, <span class="stringliteral">&quot;srcActNotFound&quot;</span>, <span class="stringliteral">&quot;Source account not found.&quot;</span>, 404},</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ad23b4971210983fe07f7225143e02225">rpcSRC_CUR_MALFORMED</a>, <span class="stringliteral">&quot;srcCurMalformed&quot;</span>, <span class="stringliteral">&quot;Source currency is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a9e0f3e460ea9530eb29736e0cd9b4304">rpcSRC_ISR_MALFORMED</a>, <span class="stringliteral">&quot;srcIsrMalformed&quot;</span>, <span class="stringliteral">&quot;Source issuer is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a8ea4e65eae406a522497b5a12dcde036">rpcSTREAM_MALFORMED</a>, <span class="stringliteral">&quot;malformedStream&quot;</span>, <span class="stringliteral">&quot;Stream malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a41779a85a65f6faeb648c960e77f388f">rpcTOO_BUSY</a>, <span class="stringliteral">&quot;tooBusy&quot;</span>, <span class="stringliteral">&quot;The server is too busy to help you now.&quot;</span>, 503},</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a34422dc324e558835f6b63c7f430729a">rpcTXN_NOT_FOUND</a>, <span class="stringliteral">&quot;txnNotFound&quot;</span>, <span class="stringliteral">&quot;Transaction not found.&quot;</span>, 404},</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a2e316006c45784996f1c36ff28ecf795">rpcUNKNOWN_COMMAND</a>, <span class="stringliteral">&quot;unknownCmd&quot;</span>, <span class="stringliteral">&quot;Unknown method.&quot;</span>, 405},</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a1a87d932a3aa4d8c546fa831ce6f3804">rpcORACLE_MALFORMED</a>, <span class="stringliteral">&quot;oracleMalformed&quot;</span>, <span class="stringliteral">&quot;Oracle request is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a81c43f54c2aae9c4e2263be5412a9e7e">rpcBAD_CREDENTIALS</a>, <span class="stringliteral">&quot;badCredentials&quot;</span>, <span class="stringliteral">&quot;Credentials do not exist, are not accepted, or have expired.&quot;</span>, 400},</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a4fa92eda2a5646cf19562903188f6417">rpcTX_SIGNED</a>, <span class="stringliteral">&quot;transactionSigned&quot;</span>, <span class="stringliteral">&quot;Transaction should not be signed.&quot;</span>, 400}};</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span><span class="comment">// clang-format on</span></div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> </div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span><span class="comment">// Sort and validate unorderedErrorInfos at compile time. Should be</span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span><span class="comment">// converted to consteval when get to C++20.</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span><span class="keyword">template</span> &lt;<span class="keywordtype">int</span> M, <span class="keywordtype">int</span> N&gt;</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span><span class="keyword">constexpr</span> <span class="keyword">auto</span></div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC_1_1detail.html#ae8a277a8a38dcb1d28661036537336b4"> 120</a></span><a class="code hl_function" href="namespaceripple_1_1RPC_1_1detail.html#ae8a277a8a38dcb1d28661036537336b4">sortErrorInfos</a>(<a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <span class="keyword">const</span> (&amp;unordered)[N]) -&gt; <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;ErrorInfo, M&gt;</a></div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span>{</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;ErrorInfo, M&gt;</a> ret = {};</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> </div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keywordflow">for</span> (<a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <span class="keyword">const</span>&amp; info : unordered)</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> {</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keywordflow">if</span> (info.code &lt;= <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a6f69b339743d28bbc421fa3b31437173">rpcSUCCESS</a> || info.code &gt; <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a12405c5cf850257ddac293134371f64d">rpcLAST</a>)</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/out_of_range.html">std::out_of_range</a>(<span class="stringliteral">&quot;Invalid error_code_i&quot;</span>));</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> </div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <span class="comment">// The first valid code follows rpcSUCCESS immediately.</span></div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keyword">static_assert</span>(<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a6f69b339743d28bbc421fa3b31437173">rpcSUCCESS</a> == 0, <span class="stringliteral">&quot;Unexpected error_code_i layout.&quot;</span>);</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keywordtype">int</span> <span class="keyword">const</span> index{info.code - 1};</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="preprocessor">#include &lt;<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/array.html">array</a>&gt;</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="preprocessor">#include &lt;<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/stdexcept.html">stdexcept</a>&gt;</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="preprocessor">#include &lt;<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/string.html">string</a>&gt;</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceripple.html">ripple</a> {</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="keyword">namespace </span>RPC {</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC_1_1detail.html"> 32</a></span><span class="keyword">namespace </span>detail {</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="comment">// Unordered array of ErrorInfos, so we don&#39;t have to maintain the list</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="comment">// ordering by hand.</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="comment">//</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="comment">// This array will be omitted from the object file; only the sorted version</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="comment">// will remain in the object file. But the string literals will remain.</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="comment">//</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="comment">// There&#39;s a certain amount of tension in determining the correct HTTP</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="comment">// status to associate with a given RPC error. Initially all RPC errors</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="comment">// returned 200 (OK). And that&#39;s the default behavior if no HTTP status code</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="comment">// is specified below.</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="comment">//</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span><span class="comment">// The codes currently selected target the load balancer fail-over use case.</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="comment">// If a query fails on one node but is likely to have a positive outcome</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="comment">// on a different node, then the failure should return a 4xx/5xx range</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="comment">// status code.</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="comment">// clang-format off</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC_1_1detail.html#ae8de80620fff9de55ec0ddb5775c26b8"> 51</a></span><span class="keyword">constexpr</span> <span class="keyword">static</span> <a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#ae8de80620fff9de55ec0ddb5775c26b8">unorderedErrorInfos</a>[]{</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a4fba57dbbed9bfaa196e1a0e0915dc8a">rpcACT_MALFORMED</a>, <span class="stringliteral">&quot;actMalformed&quot;</span>, <span class="stringliteral">&quot;Account malformed.&quot;</span>},</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a044301ed3c32624aade5888d1c60566f">rpcACT_NOT_FOUND</a>, <span class="stringliteral">&quot;actNotFound&quot;</span>, <span class="stringliteral">&quot;Account not found.&quot;</span>},</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a63fd0c00dcecf06df448bf7eddf6bd8c">rpcALREADY_MULTISIG</a>, <span class="stringliteral">&quot;alreadyMultisig&quot;</span>, <span class="stringliteral">&quot;Already multisigned.&quot;</span>},</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a11b93b10f2466e402c74aa4a9b5cb2f7">rpcALREADY_SINGLE_SIG</a>, <span class="stringliteral">&quot;alreadySingleSig&quot;</span>, <span class="stringliteral">&quot;Already single-signed.&quot;</span>},</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a1c4319d23e52800c6dc951ed7d343cea">rpcAMENDMENT_BLOCKED</a>, <span class="stringliteral">&quot;amendmentBlocked&quot;</span>, <span class="stringliteral">&quot;Amendment blocked, need upgrade.&quot;</span>, 503},</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a7a140417a251408888375e3b6c0cfcd5">rpcEXPIRED_VALIDATOR_LIST</a>, <span class="stringliteral">&quot;unlBlocked&quot;</span>, <span class="stringliteral">&quot;Validator list expired.&quot;</span>, 503},</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a19bc14d53a84c5b1d5c1693aa0e9e317">rpcATX_DEPRECATED</a>, <span class="stringliteral">&quot;deprecated&quot;</span>, <span class="stringliteral">&quot;Use the new API or specify a ledger range.&quot;</span>, 400},</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a5b391b66e90a1cb080cf29d83141853d">rpcBAD_KEY_TYPE</a>, <span class="stringliteral">&quot;badKeyType&quot;</span>, <span class="stringliteral">&quot;Bad key type.&quot;</span>, 400},</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a5a9afe2f583b5c5e615979d14c00e7bd">rpcBAD_FEATURE</a>, <span class="stringliteral">&quot;badFeature&quot;</span>, <span class="stringliteral">&quot;Feature unknown or invalid.&quot;</span>, 500},</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a06d57c943aeb0aff8b6d87d64cbcfa04">rpcBAD_ISSUER</a>, <span class="stringliteral">&quot;badIssuer&quot;</span>, <span class="stringliteral">&quot;Issuer account malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a64f2f624cc4844b4907be821dccabbd9">rpcBAD_MARKET</a>, <span class="stringliteral">&quot;badMarket&quot;</span>, <span class="stringliteral">&quot;No such market.&quot;</span>, 404},</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a888a186bc5ae79d68140783e22298394">rpcBAD_SECRET</a>, <span class="stringliteral">&quot;badSecret&quot;</span>, <span class="stringliteral">&quot;Secret does not match account.&quot;</span>, 403},</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ad2f8f023342d32f2602688202894cabe">rpcBAD_SEED</a>, <span class="stringliteral">&quot;badSeed&quot;</span>, <span class="stringliteral">&quot;Disallowed seed.&quot;</span>, 403},</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a89a147d7376535a497c85024dabc9167">rpcBAD_SYNTAX</a>, <span class="stringliteral">&quot;badSyntax&quot;</span>, <span class="stringliteral">&quot;Syntax error.&quot;</span>, 400},</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aa67c34c5d359f52c3f1fdcf2ce06dbc9">rpcCHANNEL_MALFORMED</a>, <span class="stringliteral">&quot;channelMalformed&quot;</span>, <span class="stringliteral">&quot;Payment channel is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a60badd0db2ef5b154d6101fe7b845e39">rpcCHANNEL_AMT_MALFORMED</a>, <span class="stringliteral">&quot;channelAmtMalformed&quot;</span>, <span class="stringliteral">&quot;Payment channel amount is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ab86d56c66edde43e490eec3de23deb47">rpcCOMMAND_MISSING</a>, <span class="stringliteral">&quot;commandMissing&quot;</span>, <span class="stringliteral">&quot;Missing command entry.&quot;</span>, 400},</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aec50f1af38ef002318ef8f19ca27560c">rpcDB_DESERIALIZATION</a>, <span class="stringliteral">&quot;dbDeserialization&quot;</span>, <span class="stringliteral">&quot;Database deserialization error.&quot;</span>, 502},</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ac88bf3c7097096c5ed0fc4d354e91950">rpcDST_ACT_MALFORMED</a>, <span class="stringliteral">&quot;dstActMalformed&quot;</span>, <span class="stringliteral">&quot;Destination account is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a04a908ae049e097e9e7896ba3deef874">rpcDST_ACT_MISSING</a>, <span class="stringliteral">&quot;dstActMissing&quot;</span>, <span class="stringliteral">&quot;Destination account not provided.&quot;</span>, 400},</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aec93776d4f8dd6d4dac1ac2a447d196a">rpcDST_ACT_NOT_FOUND</a>, <span class="stringliteral">&quot;dstActNotFound&quot;</span>, <span class="stringliteral">&quot;Destination account not found.&quot;</span>, 404},</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ab2d46f2d2f48b9b2a69a3dd7900c2095">rpcDST_AMT_MALFORMED</a>, <span class="stringliteral">&quot;dstAmtMalformed&quot;</span>, <span class="stringliteral">&quot;Destination amount/currency/issuer is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ae21a94cfc5c7f48c1bdf6fd45b21e88b">rpcDST_AMT_MISSING</a>, <span class="stringliteral">&quot;dstAmtMissing&quot;</span>, <span class="stringliteral">&quot;Destination amount/currency/issuer is missing.&quot;</span>, 400},</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a7eec43248b5e3342fa6ff1fcf9976519">rpcDST_ISR_MALFORMED</a>, <span class="stringliteral">&quot;dstIsrMalformed&quot;</span>, <span class="stringliteral">&quot;Destination issuer is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a17eb7d1bbf2edda8e901174203e1e824">rpcEXCESSIVE_LGR_RANGE</a>, <span class="stringliteral">&quot;excessiveLgrRange&quot;</span>, <span class="stringliteral">&quot;Ledger range exceeds 1000.&quot;</span>, 400},</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932abbd1895751c150ad43066e45683a3a6a">rpcFORBIDDEN</a>, <span class="stringliteral">&quot;forbidden&quot;</span>, <span class="stringliteral">&quot;Bad credentials.&quot;</span>, 403},</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ae44751c9b253c3b447721a315c5525c7">rpcHIGH_FEE</a>, <span class="stringliteral">&quot;highFee&quot;</span>, <span class="stringliteral">&quot;Current transaction fee exceeds your limit.&quot;</span>, 402},</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a839833d48b635d8df6a9176274ae922f">rpcINTERNAL</a>, <span class="stringliteral">&quot;internal&quot;</span>, <span class="stringliteral">&quot;Internal error.&quot;</span>, 500},</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a2a99d997786c15b8688fdcd6242d386f">rpcINVALID_LGR_RANGE</a>, <span class="stringliteral">&quot;invalidLgrRange&quot;</span>, <span class="stringliteral">&quot;Ledger range is invalid.&quot;</span>, 400},</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a82ddebc5ec7a37ff38892487277bf9c4">rpcINVALID_PARAMS</a>, <span class="stringliteral">&quot;invalidParams&quot;</span>, <span class="stringliteral">&quot;Invalid parameters.&quot;</span>, 400},</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ad2a733704a1bd3f6f03e451baf23fc53">rpcINVALID_HOTWALLET</a>, <span class="stringliteral">&quot;invalidHotWallet&quot;</span>, <span class="stringliteral">&quot;Invalid hotwallet.&quot;</span>, 400},</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a13cb05bfc011d1eec5fa52b5a3417043">rpcISSUE_MALFORMED</a>, <span class="stringliteral">&quot;issueMalformed&quot;</span>, <span class="stringliteral">&quot;Issue is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ac1a6dff600f246dd125ce9d6d02eeeba">rpcJSON_RPC</a>, <span class="stringliteral">&quot;json_rpc&quot;</span>, <span class="stringliteral">&quot;JSON-RPC transport error.&quot;</span>, 500},</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a9523d81ad23bb880bc9169950a780501">rpcLGR_IDXS_INVALID</a>, <span class="stringliteral">&quot;lgrIdxsInvalid&quot;</span>, <span class="stringliteral">&quot;Ledger indexes invalid.&quot;</span>, 400},</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ab6f7ca2b4e8b89a35acdbda0e1af8985">rpcLGR_IDX_MALFORMED</a>, <span class="stringliteral">&quot;lgrIdxMalformed&quot;</span>, <span class="stringliteral">&quot;Ledger index malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a94c06165d2c9835fabfdb7388b68d376">rpcLGR_NOT_FOUND</a>, <span class="stringliteral">&quot;lgrNotFound&quot;</span>, <span class="stringliteral">&quot;Ledger not found.&quot;</span>, 404},</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a3df7a80b8a138b99a8e0723d2364d798">rpcLGR_NOT_VALIDATED</a>, <span class="stringliteral">&quot;lgrNotValidated&quot;</span>, <span class="stringliteral">&quot;Ledger not validated.&quot;</span>, 202},</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a55f16b6766448484475fc0f2db63d92b">rpcMASTER_DISABLED</a>, <span class="stringliteral">&quot;masterDisabled&quot;</span>, <span class="stringliteral">&quot;Master key is disabled.&quot;</span>, 403},</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ac6b74149815b431c392a0538b5df7b39">rpcNOT_ENABLED</a>, <span class="stringliteral">&quot;notEnabled&quot;</span>, <span class="stringliteral">&quot;Not enabled in configuration.&quot;</span>, 501},</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a9a898f996bdd8a3b2e718444d86e1640">rpcNOT_IMPL</a>, <span class="stringliteral">&quot;notImpl&quot;</span>, <span class="stringliteral">&quot;Not implemented.&quot;</span>, 501},</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a6ec49deb0783b06f293634d38eb407b9">rpcNOT_READY</a>, <span class="stringliteral">&quot;notReady&quot;</span>, <span class="stringliteral">&quot;Not ready to handle this request.&quot;</span>, 503},</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a0d6de5ceef1ebe6f65e14a7561563550">rpcNOT_SUPPORTED</a>, <span class="stringliteral">&quot;notSupported&quot;</span>, <span class="stringliteral">&quot;Operation not supported.&quot;</span>, 501},</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932abc5ca87666d140c5f56880e7a7448773">rpcNO_CLOSED</a>, <span class="stringliteral">&quot;noClosed&quot;</span>, <span class="stringliteral">&quot;Closed ledger is unavailable.&quot;</span>, 503},</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a74511028d6a24bc8826f5fc70ca61ef5">rpcNO_CURRENT</a>, <span class="stringliteral">&quot;noCurrent&quot;</span>, <span class="stringliteral">&quot;Current ledger is unavailable.&quot;</span>, 503},</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932af301bbeaf5fcfb44db08132e6eae4ac2">rpcNOT_SYNCED</a>, <span class="stringliteral">&quot;notSynced&quot;</span>, <span class="stringliteral">&quot;Not synced to the network.&quot;</span>, 503},</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a02193610b83aaaae66347f6236dcf995">rpcNO_EVENTS</a>, <span class="stringliteral">&quot;noEvents&quot;</span>, <span class="stringliteral">&quot;Current transport does not support events.&quot;</span>, 405},</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a128bdc6241c00a1d4486399d304c2d28">rpcNO_NETWORK</a>, <span class="stringliteral">&quot;noNetwork&quot;</span>, <span class="stringliteral">&quot;Not synced to the network.&quot;</span>, 503},</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932af84f0f070938fb2e6bfc21dd28e98c5c">rpcNO_PERMISSION</a>, <span class="stringliteral">&quot;noPermission&quot;</span>, <span class="stringliteral">&quot;You don&#39;t have permission for this command.&quot;</span>, 401},</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aaa66891292b88906637528756e064d1e">rpcNO_PF_REQUEST</a>, <span class="stringliteral">&quot;noPathRequest&quot;</span>, <span class="stringliteral">&quot;No pathfinding request in progress.&quot;</span>, 404},</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a6b62321701dd9bdac951e62cf9a478a5">rpcOBJECT_NOT_FOUND</a>, <span class="stringliteral">&quot;objectNotFound&quot;</span>, <span class="stringliteral">&quot;The requested object was not found.&quot;</span>, 404},</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a78e5ffef07cc85fedafde770039313bc">rpcPUBLIC_MALFORMED</a>, <span class="stringliteral">&quot;publicMalformed&quot;</span>, <span class="stringliteral">&quot;Public key is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a70a773ee3a341f5704835d3276b814a0">rpcSENDMAX_MALFORMED</a>, <span class="stringliteral">&quot;sendMaxMalformed&quot;</span>, <span class="stringliteral">&quot;SendMax amount malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a9e3a3fa2bb1e04da92ea7253db9189d3">rpcSIGNING_MALFORMED</a>, <span class="stringliteral">&quot;signingMalformed&quot;</span>, <span class="stringliteral">&quot;Signing of transaction is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a55a275d2d3a5e83d075c30650592949d">rpcSLOW_DOWN</a>, <span class="stringliteral">&quot;slowDown&quot;</span>, <span class="stringliteral">&quot;You are placing too much load on the server.&quot;</span>, 429},</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a967859223f75630b2c78876fca0c0436">rpcSRC_ACT_MALFORMED</a>, <span class="stringliteral">&quot;srcActMalformed&quot;</span>, <span class="stringliteral">&quot;Source account is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932afff1867365ccf8f1661c8d796c93ef4c">rpcSRC_ACT_MISSING</a>, <span class="stringliteral">&quot;srcActMissing&quot;</span>, <span class="stringliteral">&quot;Source account not provided.&quot;</span>, 400},</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a45e21d134aa6921065916fcbcb875877">rpcSRC_ACT_NOT_FOUND</a>, <span class="stringliteral">&quot;srcActNotFound&quot;</span>, <span class="stringliteral">&quot;Source account not found.&quot;</span>, 404},</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932ad23b4971210983fe07f7225143e02225">rpcSRC_CUR_MALFORMED</a>, <span class="stringliteral">&quot;srcCurMalformed&quot;</span>, <span class="stringliteral">&quot;Source currency is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a9e0f3e460ea9530eb29736e0cd9b4304">rpcSRC_ISR_MALFORMED</a>, <span class="stringliteral">&quot;srcIsrMalformed&quot;</span>, <span class="stringliteral">&quot;Source issuer is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a8ea4e65eae406a522497b5a12dcde036">rpcSTREAM_MALFORMED</a>, <span class="stringliteral">&quot;malformedStream&quot;</span>, <span class="stringliteral">&quot;Stream malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a41779a85a65f6faeb648c960e77f388f">rpcTOO_BUSY</a>, <span class="stringliteral">&quot;tooBusy&quot;</span>, <span class="stringliteral">&quot;The server is too busy to help you now.&quot;</span>, 503},</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a34422dc324e558835f6b63c7f430729a">rpcTXN_NOT_FOUND</a>, <span class="stringliteral">&quot;txnNotFound&quot;</span>, <span class="stringliteral">&quot;Transaction not found.&quot;</span>, 404},</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a2e316006c45784996f1c36ff28ecf795">rpcUNKNOWN_COMMAND</a>, <span class="stringliteral">&quot;unknownCmd&quot;</span>, <span class="stringliteral">&quot;Unknown method.&quot;</span>, 405},</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a1a87d932a3aa4d8c546fa831ce6f3804">rpcORACLE_MALFORMED</a>, <span class="stringliteral">&quot;oracleMalformed&quot;</span>, <span class="stringliteral">&quot;Oracle request is malformed.&quot;</span>, 400},</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a81c43f54c2aae9c4e2263be5412a9e7e">rpcBAD_CREDENTIALS</a>, <span class="stringliteral">&quot;badCredentials&quot;</span>, <span class="stringliteral">&quot;Credentials do not exist, are not accepted, or have expired.&quot;</span>, 400},</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> {<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a4fa92eda2a5646cf19562903188f6417">rpcTX_SIGNED</a>, <span class="stringliteral">&quot;transactionSigned&quot;</span>, <span class="stringliteral">&quot;Transaction should not be signed.&quot;</span>, 400}};</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span><span class="comment">// clang-format on</span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> </div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span><span class="comment">// Sort and validate unorderedErrorInfos at compile time. Should be</span></div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span><span class="comment">// converted to consteval when get to C++20.</span></div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span><span class="keyword">template</span> &lt;<span class="keywordtype">int</span> M, <span class="keywordtype">int</span> N&gt;</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span><span class="keyword">constexpr</span> <span class="keyword">auto</span></div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC_1_1detail.html#ae8a277a8a38dcb1d28661036537336b4"> 124</a></span><a class="code hl_function" href="namespaceripple_1_1RPC_1_1detail.html#ae8a277a8a38dcb1d28661036537336b4">sortErrorInfos</a>(<a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <span class="keyword">const</span> (&amp;unordered)[N]) -&gt; <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;ErrorInfo, M&gt;</a></div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span>{</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/container/array.html">std::array&lt;ErrorInfo, M&gt;</a> ret = {};</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> </div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keywordflow">for</span> (<a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <span class="keyword">const</span>&amp; info : unordered)</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> {</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keywordflow">if</span> (info.code &lt;= <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a6f69b339743d28bbc421fa3b31437173">rpcSUCCESS</a> || info.code &gt; <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a12405c5cf850257ddac293134371f64d">rpcLAST</a>)</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/out_of_range.html">std::out_of_range</a>(<span class="stringliteral">&quot;Invalid error_code_i&quot;</span>));</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> </div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keywordflow">if</span> (ret[index].code != <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aa4f3cb4313d397ba327dfc49ce439cae">rpcUNKNOWN</a>)</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a>(<span class="stringliteral">&quot;Duplicate error_code_i in list&quot;</span>));</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> </div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> ret[index] = info;</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> }</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> </div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <span class="comment">// Verify that all entries are filled in starting with 1 and proceeding</span></div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <span class="comment">// to rpcLAST.</span></div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <span class="comment">//</span></div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="comment">// It&#39;s okay for there to be missing entries; they will contain the code</span></div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="comment">// rpcUNKNOWN. But other than that all entries should match their index.</span></div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="keywordtype">int</span> codeCount{0};</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <span class="keywordtype">int</span> expect{<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a89a147d7376535a497c85024dabc9167">rpcBAD_SYNTAX</a> - 1};</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keywordflow">for</span> (<a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <span class="keyword">const</span>&amp; info : ret)</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> {</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> ++expect;</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keywordflow">if</span> (info.code == <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aa4f3cb4313d397ba327dfc49ce439cae">rpcUNKNOWN</a>)</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="keywordflow">continue</span>;</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> </div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <span class="keywordflow">if</span> (info.code != expect)</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a>(<span class="stringliteral">&quot;Empty error_code_i in list&quot;</span>));</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> ++codeCount;</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> }</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="keywordflow">if</span> (expect != <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a12405c5cf850257ddac293134371f64d">rpcLAST</a>)</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a>(<span class="stringliteral">&quot;Insufficient list entries&quot;</span>));</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordflow">if</span> (codeCount != N)</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a>(<span class="stringliteral">&quot;Bad handling of unorderedErrorInfos&quot;</span>));</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> </div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="keywordflow">return</span> ret;</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span>}</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> </div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC_1_1detail.html#aa702f450a33affe49c682659ea86ad90"> 164</a></span><span class="keyword">constexpr</span> <span class="keyword">auto</span> <a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#aa702f450a33affe49c682659ea86ad90">sortedErrorInfos</a>{sortErrorInfos&lt;rpcLAST&gt;(<a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#ae8de80620fff9de55ec0ddb5775c26b8">unorderedErrorInfos</a>)};</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> </div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC_1_1detail.html#ac52c1b9c7196e379c9a838cde09592bb"> 166</a></span><span class="keyword">constexpr</span> <a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#ac52c1b9c7196e379c9a838cde09592bb">unknownError</a>;</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="comment">// The first valid code follows rpcSUCCESS immediately.</span></div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keyword">static_assert</span>(<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a6f69b339743d28bbc421fa3b31437173">rpcSUCCESS</a> == 0, <span class="stringliteral">&quot;Unexpected error_code_i layout.&quot;</span>);</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="keywordtype">int</span> <span class="keyword">const</span> index{info.code - 1};</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> </div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="keywordflow">if</span> (ret[index].code != <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aa4f3cb4313d397ba327dfc49ce439cae">rpcUNKNOWN</a>)</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a>(<span class="stringliteral">&quot;Duplicate error_code_i in list&quot;</span>));</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> ret[index] = info;</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> }</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> </div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="comment">// Verify that all entries are filled in starting with 1 and proceeding</span></div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="comment">// to rpcLAST.</span></div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <span class="comment">//</span></div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="comment">// It&#39;s okay for there to be missing entries; they will contain the code</span></div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="comment">// rpcUNKNOWN. But other than that all entries should match their index.</span></div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="keywordtype">int</span> codeCount{0};</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keywordtype">int</span> expect{<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a89a147d7376535a497c85024dabc9167">rpcBAD_SYNTAX</a> - 1};</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="keywordflow">for</span> (<a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <span class="keyword">const</span>&amp; info : ret)</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> {</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> ++expect;</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keywordflow">if</span> (info.code == <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932aa4f3cb4313d397ba327dfc49ce439cae">rpcUNKNOWN</a>)</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <span class="keywordflow">continue</span>;</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> </div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="keywordflow">if</span> (info.code != expect)</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a>(<span class="stringliteral">&quot;Empty error_code_i in list&quot;</span>));</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> ++codeCount;</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> }</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <span class="keywordflow">if</span> (expect != <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a12405c5cf850257ddac293134371f64d">rpcLAST</a>)</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a>(<span class="stringliteral">&quot;Insufficient list entries&quot;</span>));</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="keywordflow">if</span> (codeCount != N)</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <span class="keywordflow">throw</span>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a>(<span class="stringliteral">&quot;Bad handling of unorderedErrorInfos&quot;</span>));</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> </div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <span class="keywordflow">return</span> ret;</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span>}</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> </div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span>} <span class="comment">// namespace detail</span></div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC_1_1detail.html#aa702f450a33affe49c682659ea86ad90"> 168</a></span><span class="keyword">constexpr</span> <span class="keyword">auto</span> <a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#aa702f450a33affe49c682659ea86ad90">sortedErrorInfos</a>{sortErrorInfos&lt;rpcLAST&gt;(<a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#ae8de80620fff9de55ec0ddb5775c26b8">unorderedErrorInfos</a>)};</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> </div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span><span class="comment">//------------------------------------------------------------------------------</span></div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC_1_1detail.html#ac52c1b9c7196e379c9a838cde09592bb"> 170</a></span><span class="keyword">constexpr</span> <a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#ac52c1b9c7196e379c9a838cde09592bb">unknownError</a>;</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> </div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span><a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <span class="keyword">const</span>&amp;</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#aa01c09044342d3707e231b3ede5086f0"> 173</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#aa01c09044342d3707e231b3ede5086f0">get_error_info</a>(<a class="code hl_enumeration" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932">error_code_i</a> code)</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span>{</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <span class="keywordflow">if</span> (code &lt;= rpcSUCCESS || code &gt; <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a12405c5cf850257ddac293134371f64d">rpcLAST</a>)</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#ac52c1b9c7196e379c9a838cde09592bb">detail::unknownError</a>;</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#aa702f450a33affe49c682659ea86ad90">detail::sortedErrorInfos</a>[code - 1];</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span>}</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> </div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span><a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a></div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#a2cd6200f6709780fcf1dd26ec9cd2866"> 181</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#a2cd6200f6709780fcf1dd26ec9cd2866">make_error</a>(<a class="code hl_enumeration" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932">error_code_i</a> code)</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span>{</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> <a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> json;</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <a class="code hl_function" href="namespaceripple_1_1RPC.html#a577bde9602a28f59e445c496f92a1ccf">inject_error</a>(code, json);</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> <span class="keywordflow">return</span> json;</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span>}</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> </div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span><a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a></div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#a13f1f4cafeef7807d8e84fc1b4980079"> 189</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#a2cd6200f6709780fcf1dd26ec9cd2866">make_error</a>(<a class="code hl_enumeration" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932">error_code_i</a> code, <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>&amp; message)</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span>{</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> <a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> json;</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> <a class="code hl_function" href="namespaceripple_1_1RPC.html#a577bde9602a28f59e445c496f92a1ccf">inject_error</a>(code, message, json);</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="keywordflow">return</span> json;</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span>}</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> </div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span><span class="keywordtype">bool</span></div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#a1a79f0c33d1405fe85c40d63a49658bd"> 197</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#a1a79f0c33d1405fe85c40d63a49658bd">contains_error</a>(<a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> <span class="keyword">const</span>&amp; json)</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span>{</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> <span class="keywordflow">if</span> (json.<a class="code hl_function" href="classJson_1_1Value.html#a8cf96c0f2a552051fcfc78ffee60e037">isObject</a>() &amp;&amp; json.<a class="code hl_function" href="classJson_1_1Value.html#ad6d4df2227321bab05e86667609a7fad">isMember</a>(jss::error))</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span>}</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> </div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span><span class="keywordtype">int</span></div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#a73e0accbac78ba2dda7a2ba0f3889800"> 205</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#a73e0accbac78ba2dda7a2ba0f3889800">error_code_http_status</a>(<a class="code hl_enumeration" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932">error_code_i</a> code)</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span>{</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceripple_1_1RPC.html#aa01c09044342d3707e231b3ede5086f0">get_error_info</a>(code).<a class="code hl_variable" href="structripple_1_1RPC_1_1ErrorInfo.html#a08285f5655ec9e56b914d8d699820a93">http_status</a>;</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span>}</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> </div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span>} <span class="comment">// namespace RPC</span></div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> </div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"><a class="line" href="namespaceripple.html#a23f02900cac703bddf91fff471cb9d65"> 213</a></span><a class="code hl_function" href="namespaceripple.html#a23f02900cac703bddf91fff471cb9d65">rpcErrorString</a>(<a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> <span class="keyword">const</span>&amp; jv)</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span>{</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> XRPL_ASSERT(</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> <a class="code hl_function" href="namespaceripple_1_1RPC.html#a1a79f0c33d1405fe85c40d63a49658bd">RPC::contains_error</a>(jv),</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> <span class="stringliteral">&quot;ripple::RPC::rpcErrorString : input contains an error&quot;</span>);</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> <span class="keywordflow">return</span> jv[jss::error].<a class="code hl_function" href="classJson_1_1Value.html#ab0d86bf425efefd03513e8dbfaca317b">asString</a>() + jv[jss::error_message].<a class="code hl_function" href="classJson_1_1Value.html#ab0d86bf425efefd03513e8dbfaca317b">asString</a>();</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span>}</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> </div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span>} <span class="comment">// namespace ripple</span></div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span>} <span class="comment">// namespace detail</span></div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> </div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span><span class="comment">//------------------------------------------------------------------------------</span></div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> </div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span><a class="code hl_struct" href="structripple_1_1RPC_1_1ErrorInfo.html">ErrorInfo</a> <span class="keyword">const</span>&amp;</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#aa01c09044342d3707e231b3ede5086f0"> 177</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#aa01c09044342d3707e231b3ede5086f0">get_error_info</a>(<a class="code hl_enumeration" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932">error_code_i</a> code)</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span>{</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <span class="keywordflow">if</span> (code &lt;= rpcSUCCESS || code &gt; <a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a12405c5cf850257ddac293134371f64d">rpcLAST</a>)</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#ac52c1b9c7196e379c9a838cde09592bb">detail::unknownError</a>;</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="namespaceripple_1_1RPC_1_1detail.html#aa702f450a33affe49c682659ea86ad90">detail::sortedErrorInfos</a>[code - 1];</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span>}</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> </div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span><a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a></div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#a2cd6200f6709780fcf1dd26ec9cd2866"> 185</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#a2cd6200f6709780fcf1dd26ec9cd2866">make_error</a>(<a class="code hl_enumeration" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932">error_code_i</a> code)</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span>{</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> <a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> json;</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <a class="code hl_function" href="namespaceripple_1_1RPC.html#a577bde9602a28f59e445c496f92a1ccf">inject_error</a>(code, json);</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <span class="keywordflow">return</span> json;</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span>}</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> </div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span><a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a></div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#a13f1f4cafeef7807d8e84fc1b4980079"> 193</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#a2cd6200f6709780fcf1dd26ec9cd2866">make_error</a>(<a class="code hl_enumeration" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932">error_code_i</a> code, <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>&amp; message)</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span>{</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> <a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> json;</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <a class="code hl_function" href="namespaceripple_1_1RPC.html#a577bde9602a28f59e445c496f92a1ccf">inject_error</a>(code, message, json);</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> <span class="keywordflow">return</span> json;</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span>}</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> </div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span><span class="keywordtype">bool</span></div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#a1a79f0c33d1405fe85c40d63a49658bd"> 201</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#a1a79f0c33d1405fe85c40d63a49658bd">contains_error</a>(<a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> <span class="keyword">const</span>&amp; json)</div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span>{</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <span class="keywordflow">if</span> (json.<a class="code hl_function" href="classJson_1_1Value.html#a8cf96c0f2a552051fcfc78ffee60e037">isObject</a>() &amp;&amp; json.<a class="code hl_function" href="classJson_1_1Value.html#ad6d4df2227321bab05e86667609a7fad">isMember</a>(jss::error))</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span>}</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> </div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span><span class="keywordtype">int</span></div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"><a class="line" href="namespaceripple_1_1RPC.html#a73e0accbac78ba2dda7a2ba0f3889800"> 209</a></span><a class="code hl_function" href="namespaceripple_1_1RPC.html#a73e0accbac78ba2dda7a2ba0f3889800">error_code_http_status</a>(<a class="code hl_enumeration" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932">error_code_i</a> code)</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span>{</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceripple_1_1RPC.html#aa01c09044342d3707e231b3ede5086f0">get_error_info</a>(code).<a class="code hl_variable" href="structripple_1_1RPC_1_1ErrorInfo.html#a08285f5655ec9e56b914d8d699820a93">http_status</a>;</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span>}</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> </div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span>} <span class="comment">// namespace RPC</span></div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> </div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span><a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"><a class="line" href="namespaceripple.html#a23f02900cac703bddf91fff471cb9d65"> 217</a></span><a class="code hl_function" href="namespaceripple.html#a23f02900cac703bddf91fff471cb9d65">rpcErrorString</a>(<a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> <span class="keyword">const</span>&amp; jv)</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span>{</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> XRPL_ASSERT(</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> <a class="code hl_function" href="namespaceripple_1_1RPC.html#a1a79f0c33d1405fe85c40d63a49658bd">RPC::contains_error</a>(jv),</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <span class="stringliteral">&quot;ripple::RPC::rpcErrorString : input contains an error&quot;</span>);</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> <span class="keywordflow">return</span> jv[jss::error].<a class="code hl_function" href="classJson_1_1Value.html#ab0d86bf425efefd03513e8dbfaca317b">asString</a>() + jv[jss::error_message].<a class="code hl_function" href="classJson_1_1Value.html#ab0d86bf425efefd03513e8dbfaca317b">asString</a>();</div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span>}</div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> </div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span>} <span class="comment">// namespace ripple</span></div>
<div class="ttc" id="aarray_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/header/array.html">array</a></div></div>
<div class="ttc" id="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div></div>
<div class="ttc" id="aclassJson_1_1Value_html"><div class="ttname"><a href="classJson_1_1Value.html">Json::Value</a></div><div class="ttdoc">Represents a JSON value.</div><div class="ttdef"><b>Definition:</b> <a href="json__value_8h_source.html#l00146">json_value.h:147</a></div></div>
<div class="ttc" id="aclassJson_1_1Value_html_a8cf96c0f2a552051fcfc78ffee60e037"><div class="ttname"><a href="classJson_1_1Value.html#a8cf96c0f2a552051fcfc78ffee60e037">Json::Value::isObject</a></div><div class="ttdeci">bool isObject() const</div><div class="ttdef"><b>Definition:</b> <a href="json__value_8cpp_source.html#l01040">json_value.cpp:1040</a></div></div>
<div class="ttc" id="aclassJson_1_1Value_html_ab0d86bf425efefd03513e8dbfaca317b"><div class="ttname"><a href="classJson_1_1Value.html#ab0d86bf425efefd03513e8dbfaca317b">Json::Value::asString</a></div><div class="ttdeci">std::string asString() const</div><div class="ttdoc">Returns the unquoted string value.</div><div class="ttdef"><b>Definition:</b> <a href="json__value_8cpp_source.html#l00469">json_value.cpp:469</a></div></div>
<div class="ttc" id="aclassJson_1_1Value_html_ad6d4df2227321bab05e86667609a7fad"><div class="ttname"><a href="classJson_1_1Value.html#ad6d4df2227321bab05e86667609a7fad">Json::Value::isMember</a></div><div class="ttdeci">bool isMember(const char *key) const</div><div class="ttdoc">Return true if the object has a member named key.</div><div class="ttdef"><b>Definition:</b> <a href="json__value_8cpp_source.html#l00943">json_value.cpp:943</a></div></div>
<div class="ttc" id="aclassJson_1_1Value_html"><div class="ttname"><a href="classJson_1_1Value.html">Json::Value</a></div><div class="ttdoc">Represents a JSON value.</div><div class="ttdef"><b>Definition:</b> <a href="json__value_8h_source.html#l00147">json_value.h:148</a></div></div>
<div class="ttc" id="aclassJson_1_1Value_html_a8cf96c0f2a552051fcfc78ffee60e037"><div class="ttname"><a href="classJson_1_1Value.html#a8cf96c0f2a552051fcfc78ffee60e037">Json::Value::isObject</a></div><div class="ttdeci">bool isObject() const</div><div class="ttdef"><b>Definition:</b> <a href="json__value_8cpp_source.html#l01046">json_value.cpp:1046</a></div></div>
<div class="ttc" id="aclassJson_1_1Value_html_ab0d86bf425efefd03513e8dbfaca317b"><div class="ttname"><a href="classJson_1_1Value.html#ab0d86bf425efefd03513e8dbfaca317b">Json::Value::asString</a></div><div class="ttdeci">std::string asString() const</div><div class="ttdoc">Returns the unquoted string value.</div><div class="ttdef"><b>Definition:</b> <a href="json__value_8cpp_source.html#l00475">json_value.cpp:475</a></div></div>
<div class="ttc" id="aclassJson_1_1Value_html_ad6d4df2227321bab05e86667609a7fad"><div class="ttname"><a href="classJson_1_1Value.html#ad6d4df2227321bab05e86667609a7fad">Json::Value::isMember</a></div><div class="ttdeci">bool isMember(const char *key) const</div><div class="ttdoc">Return true if the object has a member named key.</div><div class="ttdef"><b>Definition:</b> <a href="json__value_8cpp_source.html#l00949">json_value.cpp:949</a></div></div>
<div class="ttc" id="ainvalid_argument_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a></div></div>
<div class="ttc" id="anamespaceripple_1_1RPC_1_1detail_html_aa702f450a33affe49c682659ea86ad90"><div class="ttname"><a href="namespaceripple_1_1RPC_1_1detail.html#aa702f450a33affe49c682659ea86ad90">ripple::RPC::detail::sortedErrorInfos</a></div><div class="ttdeci">constexpr auto sortedErrorInfos</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00164">ErrorCodes.cpp:164</a></div></div>
<div class="ttc" id="anamespaceripple_1_1RPC_1_1detail_html_ac52c1b9c7196e379c9a838cde09592bb"><div class="ttname"><a href="namespaceripple_1_1RPC_1_1detail.html#ac52c1b9c7196e379c9a838cde09592bb">ripple::RPC::detail::unknownError</a></div><div class="ttdeci">constexpr ErrorInfo unknownError</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00166">ErrorCodes.cpp:166</a></div></div>
<div class="ttc" id="anamespaceripple_1_1RPC_1_1detail_html_ae8a277a8a38dcb1d28661036537336b4"><div class="ttname"><a href="namespaceripple_1_1RPC_1_1detail.html#ae8a277a8a38dcb1d28661036537336b4">ripple::RPC::detail::sortErrorInfos</a></div><div class="ttdeci">constexpr auto sortErrorInfos(ErrorInfo const (&amp;unordered)[N]) -&gt; std::array&lt; ErrorInfo, M &gt;</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00120">ErrorCodes.cpp:120</a></div></div>
<div class="ttc" id="anamespaceripple_1_1RPC_1_1detail_html_ae8de80620fff9de55ec0ddb5775c26b8"><div class="ttname"><a href="namespaceripple_1_1RPC_1_1detail.html#ae8de80620fff9de55ec0ddb5775c26b8">ripple::RPC::detail::unorderedErrorInfos</a></div><div class="ttdeci">static constexpr ErrorInfo unorderedErrorInfos[]</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00047">ErrorCodes.cpp:47</a></div></div>
<div class="ttc" id="anamespaceripple_1_1RPC_html_a1a79f0c33d1405fe85c40d63a49658bd"><div class="ttname"><a href="namespaceripple_1_1RPC.html#a1a79f0c33d1405fe85c40d63a49658bd">ripple::RPC::contains_error</a></div><div class="ttdeci">bool contains_error(Json::Value const &amp;json)</div><div class="ttdoc">Returns true if the json contains an rpc error specification.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00197">ErrorCodes.cpp:197</a></div></div>
<div class="ttc" id="anamespaceripple_1_1RPC_html_a2cd6200f6709780fcf1dd26ec9cd2866"><div class="ttname"><a href="namespaceripple_1_1RPC.html#a2cd6200f6709780fcf1dd26ec9cd2866">ripple::RPC::make_error</a></div><div class="ttdeci">Json::Value make_error(error_code_i code)</div><div class="ttdoc">Returns a new json object that reflects the error code.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00181">ErrorCodes.cpp:181</a></div></div>
<div class="ttc" id="anamespaceripple_1_1RPC_1_1detail_html_aa702f450a33affe49c682659ea86ad90"><div class="ttname"><a href="namespaceripple_1_1RPC_1_1detail.html#aa702f450a33affe49c682659ea86ad90">ripple::RPC::detail::sortedErrorInfos</a></div><div class="ttdeci">constexpr auto sortedErrorInfos</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00168">ErrorCodes.cpp:168</a></div></div>
<div class="ttc" id="anamespaceripple_1_1RPC_1_1detail_html_ac52c1b9c7196e379c9a838cde09592bb"><div class="ttname"><a href="namespaceripple_1_1RPC_1_1detail.html#ac52c1b9c7196e379c9a838cde09592bb">ripple::RPC::detail::unknownError</a></div><div class="ttdeci">constexpr ErrorInfo unknownError</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00170">ErrorCodes.cpp:170</a></div></div>
<div class="ttc" id="anamespaceripple_1_1RPC_1_1detail_html_ae8a277a8a38dcb1d28661036537336b4"><div class="ttname"><a href="namespaceripple_1_1RPC_1_1detail.html#ae8a277a8a38dcb1d28661036537336b4">ripple::RPC::detail::sortErrorInfos</a></div><div class="ttdeci">constexpr auto sortErrorInfos(ErrorInfo const (&amp;unordered)[N]) -&gt; std::array&lt; ErrorInfo, M &gt;</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00124">ErrorCodes.cpp:124</a></div></div>
<div class="ttc" id="anamespaceripple_1_1RPC_1_1detail_html_ae8de80620fff9de55ec0ddb5775c26b8"><div class="ttname"><a href="namespaceripple_1_1RPC_1_1detail.html#ae8de80620fff9de55ec0ddb5775c26b8">ripple::RPC::detail::unorderedErrorInfos</a></div><div class="ttdeci">static constexpr ErrorInfo unorderedErrorInfos[]</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00051">ErrorCodes.cpp:51</a></div></div>
<div class="ttc" id="anamespaceripple_1_1RPC_html_a1a79f0c33d1405fe85c40d63a49658bd"><div class="ttname"><a href="namespaceripple_1_1RPC.html#a1a79f0c33d1405fe85c40d63a49658bd">ripple::RPC::contains_error</a></div><div class="ttdeci">bool contains_error(Json::Value const &amp;json)</div><div class="ttdoc">Returns true if the json contains an rpc error specification.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00201">ErrorCodes.cpp:201</a></div></div>
<div class="ttc" id="anamespaceripple_1_1RPC_html_a2cd6200f6709780fcf1dd26ec9cd2866"><div class="ttname"><a href="namespaceripple_1_1RPC.html#a2cd6200f6709780fcf1dd26ec9cd2866">ripple::RPC::make_error</a></div><div class="ttdeci">Json::Value make_error(error_code_i code)</div><div class="ttdoc">Returns a new json object that reflects the error code.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00185">ErrorCodes.cpp:185</a></div></div>
<div class="ttc" id="anamespaceripple_1_1RPC_html_a577bde9602a28f59e445c496f92a1ccf"><div class="ttname"><a href="namespaceripple_1_1RPC.html#a577bde9602a28f59e445c496f92a1ccf">ripple::RPC::inject_error</a></div><div class="ttdeci">void inject_error(error_code_i code, JsonValue &amp;json)</div><div class="ttdoc">Add or update the json update to reflect the error code.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8h_source.html#l00223">ErrorCodes.h:223</a></div></div>
<div class="ttc" id="anamespaceripple_1_1RPC_html_a73e0accbac78ba2dda7a2ba0f3889800"><div class="ttname"><a href="namespaceripple_1_1RPC.html#a73e0accbac78ba2dda7a2ba0f3889800">ripple::RPC::error_code_http_status</a></div><div class="ttdeci">int error_code_http_status(error_code_i code)</div><div class="ttdoc">Returns http status that corresponds to the error code.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00205">ErrorCodes.cpp:205</a></div></div>
<div class="ttc" id="anamespaceripple_1_1RPC_html_aa01c09044342d3707e231b3ede5086f0"><div class="ttname"><a href="namespaceripple_1_1RPC.html#aa01c09044342d3707e231b3ede5086f0">ripple::RPC::get_error_info</a></div><div class="ttdeci">ErrorInfo const &amp; get_error_info(error_code_i code)</div><div class="ttdoc">Returns an ErrorInfo that reflects the error code.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00173">ErrorCodes.cpp:173</a></div></div>
<div class="ttc" id="anamespaceripple_1_1RPC_html_a73e0accbac78ba2dda7a2ba0f3889800"><div class="ttname"><a href="namespaceripple_1_1RPC.html#a73e0accbac78ba2dda7a2ba0f3889800">ripple::RPC::error_code_http_status</a></div><div class="ttdeci">int error_code_http_status(error_code_i code)</div><div class="ttdoc">Returns http status that corresponds to the error code.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00209">ErrorCodes.cpp:209</a></div></div>
<div class="ttc" id="anamespaceripple_1_1RPC_html_aa01c09044342d3707e231b3ede5086f0"><div class="ttname"><a href="namespaceripple_1_1RPC.html#aa01c09044342d3707e231b3ede5086f0">ripple::RPC::get_error_info</a></div><div class="ttdeci">ErrorInfo const &amp; get_error_info(error_code_i code)</div><div class="ttdoc">Returns an ErrorInfo that reflects the error code.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00177">ErrorCodes.cpp:177</a></div></div>
<div class="ttc" id="anamespaceripple_html"><div class="ttname"><a href="namespaceripple.html">ripple</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="algorithm_8h_source.html#l00026">algorithm.h:26</a></div></div>
<div class="ttc" id="anamespaceripple_html_a23f02900cac703bddf91fff471cb9d65"><div class="ttname"><a href="namespaceripple.html#a23f02900cac703bddf91fff471cb9d65">ripple::rpcErrorString</a></div><div class="ttdeci">std::string rpcErrorString(Json::Value const &amp;jv)</div><div class="ttdoc">Returns a single string with the contents of an RPC error.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00213">ErrorCodes.cpp:213</a></div></div>
<div class="ttc" id="anamespaceripple_html_a23f02900cac703bddf91fff471cb9d65"><div class="ttname"><a href="namespaceripple.html#a23f02900cac703bddf91fff471cb9d65">ripple::rpcErrorString</a></div><div class="ttdeci">std::string rpcErrorString(Json::Value const &amp;jv)</div><div class="ttdoc">Returns a single string with the contents of an RPC error.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8cpp_source.html#l00217">ErrorCodes.cpp:217</a></div></div>
<div class="ttc" id="anamespaceripple_html_a32d6d3ce1a48272b677d2c88b1d30932"><div class="ttname"><a href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932">ripple::error_code_i</a></div><div class="ttdeci">error_code_i</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8h_source.html#l00040">ErrorCodes.h:40</a></div></div>
<div class="ttc" id="anamespaceripple_html_a32d6d3ce1a48272b677d2c88b1d30932a02193610b83aaaae66347f6236dcf995"><div class="ttname"><a href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a02193610b83aaaae66347f6236dcf995">ripple::rpcNO_EVENTS</a></div><div class="ttdeci">@ rpcNO_EVENTS</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8h_source.html#l00054">ErrorCodes.h:54</a></div></div>
<div class="ttc" id="anamespaceripple_html_a32d6d3ce1a48272b677d2c88b1d30932a044301ed3c32624aade5888d1c60566f"><div class="ttname"><a href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a044301ed3c32624aade5888d1c60566f">ripple::rpcACT_NOT_FOUND</a></div><div class="ttdeci">@ rpcACT_NOT_FOUND</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8h_source.html#l00070">ErrorCodes.h:70</a></div></div>
@@ -387,6 +391,7 @@ $(function() {
<div class="ttc" id="anamespaceripple_html_a32d6d3ce1a48272b677d2c88b1d30932afff1867365ccf8f1661c8d796c93ef4c"><div class="ttname"><a href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932afff1867365ccf8f1661c8d796c93ef4c">ripple::rpcSRC_ACT_MISSING</a></div><div class="ttdeci">@ rpcSRC_ACT_MISSING</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8h_source.html#l00121">ErrorCodes.h:121</a></div></div>
<div class="ttc" id="aout_of_range_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/error/out_of_range.html">std::out_of_range</a></div></div>
<div class="ttc" id="astdexcept_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/header/stdexcept.html">stdexcept</a></div></div>
<div class="ttc" id="astring_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/header/string.html">string</a></div></div>
<div class="ttc" id="astructripple_1_1RPC_1_1ErrorInfo_html"><div class="ttname"><a href="structripple_1_1RPC_1_1ErrorInfo.html">ripple::RPC::ErrorInfo</a></div><div class="ttdoc">Maps an rpc error code to its token, default message, and HTTP status.</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8h_source.html#l00178">ErrorCodes.h:179</a></div></div>
<div class="ttc" id="astructripple_1_1RPC_1_1ErrorInfo_html_a08285f5655ec9e56b914d8d699820a93"><div class="ttname"><a href="structripple_1_1RPC_1_1ErrorInfo.html#a08285f5655ec9e56b914d8d699820a93">ripple::RPC::ErrorInfo::http_status</a></div><div class="ttdeci">int http_status</div><div class="ttdef"><b>Definition:</b> <a href="ErrorCodes_8h_source.html#l00212">ErrorCodes.h:212</a></div></div>
</div><!-- fragment --></div><!-- contents -->