aboutsummaryrefslogtreecommitdiff
path: root/server/api
diff options
context:
space:
mode:
authorLoic Guegan <manzerberdes@gmx.com>2019-05-11 15:27:04 +0200
committerLoic Guegan <manzerberdes@gmx.com>2019-05-11 15:27:04 +0200
commit59f42680ef0b20377989f15aa81f15be2f6a0d59 (patch)
tree7c7fb4531ced0cb68d0300f817ffb743454d2ae4 /server/api
parent39cf5947d89280d7c346a2a8677b9ad68eb3bec1 (diff)
Debug serveré
Diffstat (limited to 'server/api')
-rw-r--r--server/api/api.lisp6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/api/api.lisp b/server/api/api.lisp
index 7ccff24..476f3f9 100644
--- a/server/api/api.lisp
+++ b/server/api/api.lisp
@@ -38,8 +38,6 @@
p-request)))
-
-
(defmethod handle-new-game ((api api) data)
(with-slots (gm) api
(let* ((game-id (create-game gm)))
@@ -80,7 +78,9 @@
:element-type 'character
:adjustable t
:fill-pointer 0)))
- (format reason "~a~%" condition :escape nil)
+ (if (typep condition 'jonathan.error:<jonathan-error>)
+ (format reason "{\"type\":\"error\",\"message\":\"Failed to parse JSON\"}~%" condition :escape nil)
+ (format reason "{\"type\":\"error\",\"message\":\"~a\"}~%" condition :escape nil))
reason))))