You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Invalid HTTP requests to WabiSabiClientLibrary are not handled correctly - the descriptions of "what is wrong with the request" are not accurate (example 1) and incomplete requests can be viewed as valid (example 2).
Example 1)
The following request (on /get-liquidity-clue)
{
"rawLiquidityClue": {},
"maxSuggestedAmount": 5
}
gets a response (code 500) with the following description { "description": "The MaxSuggestedAmount field is required." }
The description is misleading - the value "maxSuggestedAmount" is provided, but the "rawLiquidityClue" is not.
Example 2)
The following request (on /get-liquidity-clue)
{
"rawLiquidityClue": {},
"maxSuggestedAmount": 5
}
Gets a response (Code 200): { "liquidityClue": 5 }
even though the rawLiquidityClue is missing from the request completely.
Wasabi Version
Current Master version (10. 10. 2023)
The text was updated successfully, but these errors were encountered:
M1nd3r
changed the title
Wrong HTTP error descriptions in WabiSabiClientLibrary
Invalid HTTP requests to WabiSabiClientLibrary are not handled correctly
Oct 10, 2023
General Description
Invalid HTTP requests to WabiSabiClientLibrary are not handled correctly - the descriptions of "what is wrong with the request" are not accurate (example 1) and incomplete requests can be viewed as valid (example 2).
Example 1)
The following request (on /get-liquidity-clue)
{
"rawLiquidityClue": {},
"maxSuggestedAmount": 5
}
(
curl -X 'POST' \ 'http://localhost:37128/get-liquidity-clue' \ -H 'accept: application/json' \ -H 'Content-Type: application/json-patch+json' \ -d '{ "rawLiquidityClue": {}, "maxSuggestedAmount": 5 }'
)gets a response (code 500) with the following description
{ "description": "The MaxSuggestedAmount field is required." }
The description is misleading - the value "maxSuggestedAmount" is provided, but the "rawLiquidityClue" is not.
Example 2)
The following request (on /get-liquidity-clue)
{
"rawLiquidityClue": {},
"maxSuggestedAmount": 5
}
Gets a response (Code 200):
{ "liquidityClue": 5 }
even though the rawLiquidityClue is missing from the request completely.
Wasabi Version
Current Master version (10. 10. 2023)
The text was updated successfully, but these errors were encountered: