# Gavin Andresen
# 2010-09-01 20:28:15
# https://bitcointalk.org/index.php?topic=969.msg11884#msg11884

I just submitted a patch to Satoshi to make bitcoin follow the @p{(link}JSON RPC over HTTP spec,@p{link)} and to use the standardized error codes from the JSON-RPC 1.1/2.0 specs. @p{par}

If you talk directly to bitcoin via JSON-RPC calls, you might need to change your code to recognize the new HTTP status codes and the new format for the 'error' member of the JSON response.  For example: @p{par}

BEFORE, send {"id":"123", "method": "nosuchmethod", "params": [] } , get response: @p{brk}

Code:
HTTP/1.1 500 Internal Server Error @p{brk}
... @p{par}

{"result":null,"error":"Method not found.","id":"123"}
AFTER:
Code:
HTTP/1.1 404  @p{brk}
... @p{par}

{"result":null,"error":{"code":-32601,"message":"Method not found"},"id":"123"} @p{brk}

 @p{brk}
I also removed the broken 'Batch' support, to simplify the code.  I had JSON-RPC-2.0 batch support working properly, but backed those changes out because JSON-RPC 2.0 is way too cutting-edge for bitcoin to support right now (none of the JSON-RPC glue libraries support it yet, and the spec is still changing a bit). @p{brk}