stratisproject / StratisBitcoinFullNode

Bitcoin full node in C#
https://stratisplatform.com
MIT License
787 stars 315 forks source link

SmartContractWalletController HTTP response status codes #4109

Open drmathias opened 4 years ago

drmathias commented 4 years ago

When calling endpoints to interact with smart contracts, when the transaction cannot be broadcast, the API is returning a 400 Bad Request response. This is misleading as the same response is returned, for example, if headers are not set correctly or the request body is not valid. When wanting to handle both situations, this becomes is an issue.

Using a different status code for transactions which are not broadcast, possibly 422, would be more appropriate.