-
Notifications
You must be signed in to change notification settings - Fork 147
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When adding invalid source, the expected list does not match with the source list
Rate oracle source list
curl -s -u ralphwashere:XXX 'http://139-xx-xx:8000/rate-oracle/sources' | jq
[
"binance",
"coin_gecko",
"coin_cap",
"kucoin",
"ascend_ex",
"gate_io",
"coinbase_advanced_trade",
"cube",
"dexalot",
"hyperliquid",
"hyperliquid_perpetual",
"derive",
"mexc"
]
logs: 13:04:54.460 GET /rate-oracle/sources INFO: 139-xx-xx:39380 - "GET /rate-oracle/sources HTTP/1.1" 200 OK
Rate oracle response when you add invalid source, observed the expected does not match the list above
curl -s -u ralphwashere:XXX -X PUT 'http://139-xx-xx:8000/rate-oracle/config' -H 'Content-Type: application/json' -d '{"rate_oracle_source": {"name": "xxxx"}}' | jq
{
"detail": [
{
"type": "enum",
"loc": [
"body",
"rate_oracle_source",
"name"
],
"msg": "Input should be 'binance', 'binance_us', 'coin_gecko', 'coin_cap', 'kucoin', 'ascend_ex', 'gate_io', 'coinbase_advanced_trade', 'cube', 'dexalot', 'hyperliquid', 'derive' or 'tegro'",
"input": "mexc",
"ctx": {
"expected": "'binance', 'binance_us', 'coin_gecko', 'coin_cap', 'kucoin', 'ascend_ex', 'gate_io', 'coinbase_advanced_trade', 'cube', 'dexalot', 'hyperliquid', 'derive' or 'tegro'"
}
}
]
}
logs: 13:04:58.875 PUT /rate-oracle/config INFO: 139-xx-xx:56550 - "PUT /rate-oracle/config HTTP/1.1" 422 Unprocessable Entity
Steps to reproduce bug
- Run PUT /rate-oracle/config with invalid source
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working