add error code for error response

add error.code
via. http://www.jsonrpc.org/specification#error_object