+static const char *ws_reply_get_error(struct json_object *content)
+{
+ struct json_object *jerror;
+
+ if (json_object_get_type(content) != json_type_object)
+ return NULL;
+
+ jerror = json_object_object_get(content, "error");
+
+ if (!jerror)
+ return NULL;
+
+ return json_object_get_string(jerror);
+}
+
+static struct json_object *
+execute(struct http_session *sess, struct json_object *rq, char **err)