From 2c65efb8e3960de1b866546c581746a2d51fc6dc Mon Sep 17 00:00:00 2001
From: Daniel <daniel@harvey>
Date: Tue, 30 Jul 2019 14:28:02 +0200
Subject: [PATCH] ENH: More verbose error for failing server-side-scripts.

---
 src/core/js/webcaosdb.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/core/js/webcaosdb.js b/src/core/js/webcaosdb.js
index 2b745c00..7e4073e1 100644
--- a/src/core/js/webcaosdb.js
+++ b/src/core/js/webcaosdb.js
@@ -111,7 +111,10 @@ this.connection = new function() {
                 });
             } catch (error) {
                 if (error.status != null) {
-                    throw new Error("POST scripting returned with HTTP status " + error.status + " - " + error.statusText);
+                    throw new Error(
+                        "POST scripting returned with HTTP status " + error.status
+                            + " - " + error.statusText + "\n"
+                            + pstring);
                 } else {
                     throw error;
                 }
-- 
GitLab