Consistent error codes in XML and JSON RPC
Handling of (XML|JSON)-RPC error codes does not seem to be consistent. I mean , I've been running plugin test suite using JSON-RPC. When matching error codes for expected failures I get some failures with message AssertionError: 1 != -32603. About this situation I have a few comments :
- JSON-RPC error codes are exactly the same as XML-RPC error codes
- In the test suite expected error code is 1 , which is outputted by XML-RPC plugin ...
- ... whereas JSON-RPC outputs standard -32603 under similar circumstanes
- There are cases (e.g. tracrpc.tests.xml_rpc: ) that fit into another error category (e.g. -32602)
- Standard code -32601 is used when requested method is not found, as expected.
Proposed changes are :
- to make XML-RPC output -32603 code on internal server errors
- to ouput -32602 code if request arguments do not comply with method signature.
Otherwise it's possible to
- force JSON-RPC to output 1 as error code instead .
- Reported - by olemis, 3 years ago
- Version set to tracrpc_1.1.2 - by olemis, 3 years ago
- Status changed from new to accepted - by olemis, 3 years ago