Return 400 http error for unknown account #912
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See discussion on #903
Return a
400
http error code for unknown account instead of500
.400
was chosen instead of404
because404
is seen bycleos
as a plugin is not enabled.cleos
could have been modified, but to better support existingcleos
, went with the generic400
error code.The following endpoints were updated to return
400
when the account could not be accessed./v1/chain/get_abi
/v1/chain/get_code
/v1/chain/get_code_hash
/v1/chain/get_raw_code_and_abi
/v1/chain/get_raw_abi
/v1/chain/get_account
/v1/chain/get_table_rows
/v1/chain/get_currency_balance
/v1/chain/get_currency_stats
Resolves #591