From 4c5a97cd858bef5a1ca43da69179ffef60664d0d Mon Sep 17 00:00:00 2001 From: r9deyes <8595dan@gmail.com> Date: Fri, 22 Sep 2023 19:29:01 +0300 Subject: [PATCH] Fixed behaviour then describe of procedure is required for making request. If describe got error anyway generate empty data editor box. Describe can got error if grpc-server cant reflect request messages, e.g. actual python's `Symbol not found` error. --- index/js/style.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/index/js/style.js b/index/js/style.js index a42780b..155caa3 100644 --- a/index/js/style.js +++ b/index/js/style.js @@ -131,8 +131,13 @@ $('#select-function').change(function(){ method: "GET", success: function(res){ if (res.error) { - alert(res.error); - return; + // on error generate empty editor. Fail of reflection should not interrupt request try. + console.log("Cant describe "+selected+" procedure: ", res.error) + res.data = { + template: "", + schema: "" + } + } generate_editor(res.data.template);