mirror of https://codeberg.org/cage/tinmop/
- [JSONRPC] used a custom error when a called function fails for some reason.
This commit is contained in:
parent
4fb9c6eb43
commit
7fc90b428c
|
@ -411,10 +411,14 @@
|
|||
:error-object (make-response-error (or (code e)
|
||||
(response-error-code +error-invalid-request+))
|
||||
(text e))))
|
||||
(make-internal-error (e &optional (id nil))
|
||||
(make-internal-error (e)
|
||||
(make-response nil
|
||||
nil
|
||||
:error-object (make-internal-error-message (format nil "~a" e))))
|
||||
(make-failed-function-error (e id)
|
||||
(make-response nil
|
||||
id
|
||||
:error-object (make-internal-error-message (format nil "~a" e)))))
|
||||
:error-object (make-failed-function-call-error-message (format nil "~a" e)))))
|
||||
(handler-case
|
||||
(multiple-value-bind (method id params)
|
||||
(displace-single-request request)
|
||||
|
@ -430,7 +434,7 @@
|
|||
(make-rpc-error e))
|
||||
(error (e)
|
||||
(maybe-log-message (format nil "jsonrpc request failed: ~a" e))
|
||||
(make-internal-error e id))))
|
||||
(make-failed-function-error e id))))
|
||||
(json-rpc-error (e)
|
||||
(make-rpc-error e))
|
||||
(error (e)
|
||||
|
|
Loading…
Reference in New Issue