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)
|
||||
::
|
||||
%result
|
||||
:- %o
|
||||
%- molt
|
||||
^- (list [@t json])
|
||||
%- pairs:enjs:format
|
||||
:: FIXME: return 'id' as string, number or NULL
|
||||
::
|
||||
:~ ['jsonrpc' s+'2.0']
|
||||
@ -51,14 +49,16 @@
|
||||
==
|
||||
::
|
||||
%error
|
||||
:- %o
|
||||
%- molt
|
||||
^- (list [@t json])
|
||||
=, enjs:format
|
||||
%- pairs
|
||||
:~ ['jsonrpc' s+'2.0']
|
||||
['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
|
||||
|
Loading…
Reference in New Issue
Block a user