1
0
Fork 0

- [JSONRPC] included actual ID to the error response when possible.

This commit is contained in:
cage 2023-01-06 12:12:32 +01:00
parent 0215a4c173
commit 4fb9c6eb43
1 changed files with 4 additions and 4 deletions

View File

@ -79,7 +79,7 @@
(make-response-error -32603 (format nil "Internal error: ~a" msg)))
(defun make-failed-function-call-error-message (msg)
(make-response-error -32001 (format nil "Failed functino call: ~a" msg)))
(make-response-error -32001 (format nil "Failed function call: ~a" msg)))
(defclass function-param ()
((name
@ -411,9 +411,9 @@
:error-object (make-response-error (or (code e)
(response-error-code +error-invalid-request+))
(text e))))
(make-internal-error (e)
(make-internal-error (e &optional (id nil))
(make-response nil
nil
id
:error-object (make-internal-error-message (format nil "~a" e)))))
(handler-case
(multiple-value-bind (method id params)
@ -430,7 +430,7 @@
(make-rpc-error e))
(error (e)
(maybe-log-message (format nil "jsonrpc request failed: ~a" e))
(make-internal-error e))))
(make-internal-error e id))))
(json-rpc-error (e)
(make-rpc-error e))
(error (e)