mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 00:13:12 +03:00
json-rpc: fix malformed error response
This commit is contained in:
parent
32cbb97b40
commit
cd4b8e696e
@ -40,9 +40,7 @@
|
|||||||
%batch a+(turn bas.response response-to-json)
|
%batch a+(turn bas.response response-to-json)
|
||||||
::
|
::
|
||||||
%result
|
%result
|
||||||
:- %o
|
%- pairs:enjs:format
|
||||||
%- molt
|
|
||||||
^- (list [@t json])
|
|
||||||
:: FIXME: return 'id' as string, number or NULL
|
:: FIXME: return 'id' as string, number or NULL
|
||||||
::
|
::
|
||||||
:~ ['jsonrpc' s+'2.0']
|
:~ ['jsonrpc' s+'2.0']
|
||||||
@ -51,14 +49,16 @@
|
|||||||
==
|
==
|
||||||
::
|
::
|
||||||
%error
|
%error
|
||||||
:- %o
|
=, enjs:format
|
||||||
%- molt
|
%- pairs
|
||||||
^- (list [@t json])
|
|
||||||
:~ ['jsonrpc' s+'2.0']
|
:~ ['jsonrpc' s+'2.0']
|
||||||
['id' ?~(id.response ~ s+id.response)]
|
['id' ?~(id.response ~ s+id.response)]
|
||||||
['code' n+code.response]
|
::
|
||||||
['message' s+message.response]
|
:- 'error'
|
||||||
==
|
%- pairs
|
||||||
|
:~ ['code' n+code.response]
|
||||||
|
['message' s+message.response]
|
||||||
|
== ==
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ validate-request
|
++ validate-request
|
||||||
|
Loading…
Reference in New Issue
Block a user