Open SaxenaKaustubh opened 3 months ago
There are different levels of validation. Some validation happens by a low layer validation, before the feature (Transactor or API) receives the parameters and then another validation happens in the feature code. The first PriceDataSeries
validation happens by a lower layer validation. The reason it fails is that the values are not a valid array. The second PriceDataSeries
validation happens by the feature code and it correctly identifies that the array is empty.
TransactionType
is validated by a lower layer and the feature code doesn't have control over it.
All of the above is true for Provider
, URI
, AssetClass
. The first failure, for instance ""
happens by the feature and it correctly identifies it as temMALFORMED
. The second failure, None
, etc, happens by the lower layer.
I don't think OracleSet
errors are inconsistent.
I will update ledger_entry
validation to return malformedDocumentID
for all invalid input.
I will update Trim
validation to return invalidParams
for all invalid input.
Rippled returns different error codes for invalid inputs under different situations. Following is the list of such fields:
""
,1
,"Invalid"
,([{}])
,[{"PriceDataSeries": ""}]]
None
,([])
None
,0
,-1
,1
,1.2
,"Invalid"
None
,0
,-1
,1
,1.2
,"Invalid"
""
""
,"020382A62402D2357ABC020382A6240205"
None
,0
,-1
,1
,1.2
,"Invalid"
ledger_entry
method call):""
,"Invalid"
,-1
None
,1.2
1.2
to int1
.get_aggregate_price
method call):""
,-1
,"abc"
None