diff options
| author | John Newbery <[email protected]> | 2017-02-09 16:39:18 -0500 |
|---|---|---|
| committer | John Newbery <[email protected]> | 2017-03-07 16:45:09 -0500 |
| commit | c1190963b388590dc0a346bf625c7e84f69cee8d (patch) | |
| tree | d7e1ebf7427eb93770d37ac516b66cbd65c703f8 /src/httpserver.cpp | |
| parent | Return correct error codes in bumpfee(). (diff) | |
| download | discoin-c1190963b388590dc0a346bf625c7e84f69cee8d.tar.xz discoin-c1190963b388590dc0a346bf625c7e84f69cee8d.zip | |
Return correct error codes in blockchain.cpp.
RPCs in blockchain.cpp were returning misleading or incorrect error
codes (for example getblock() returning RPC_INTERNAL_ERROR when the
block had been pruned). This commit fixes those error codes:
- RPC_INTERNAL_ERROR should not be returned for application-level
errors, only for genuine internal errors such as corrupted data.
- RPC_METHOD_NOT_FOUND should not be returned in response to a
JSON request for an existing method.
Those error codes have been replaced with RPC_MISC_ERROR or
RPC_INVALID_PARAMETER as appropriate.
Diffstat (limited to 'src/httpserver.cpp')
0 files changed, 0 insertions, 0 deletions