about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2026-11-18 14:54:07 +0000
committerArun Isaac2026-11-18 14:55:09 +0000
commit1aa0e2cbd2e9dd29d111093fc84c76799597282b (patch)
tree350e4462e6e5a512882d963e12d5a6b045e77767
parent2f560967fbf5623ff5c97f5b2352e0be210a84b4 (diff)
downloadkaagum-main.tar.gz
kaagum-main.tar.lz
kaagum-main.zip
Error out on unknown JSON-RPC methods. HEAD main
This improves the error backtrace a little. Instead of a match error,
we produce a slightly more comprehensible error message.
-rw-r--r--kaagum/tea.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/kaagum/tea.scm b/kaagum/tea.scm
index ac9703b..cffd1f3 100644
--- a/kaagum/tea.scm
+++ b/kaagum/tea.scm
@@ -522,7 +522,9 @@ in @code{tea-loop}."
                                           (put state-requests-alist
                                                '()
                                                <>))))
-                 (end-turn-effects session-id models "cancelled"))))))))))
+                 (end-turn-effects session-id models "cancelled"))))
+             (method
+              (error "Unknown JSON-RPC method" method))))))))
 
 (define (client-response-effects response)
   "Return the state-monadic list of effects for a new ACP @var{response}."