From caa3f9c0dc2857982b0217684987a4e5093b21d6 Mon Sep 17 00:00:00 2001 From: vermeul <swen@ethz.ch> Date: Fri, 20 Sep 2019 09:57:05 +0200 Subject: [PATCH] if creation of dataSet fails, immediately return error --- jupyter-openbis-extension/dataset.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jupyter-openbis-extension/dataset.py b/jupyter-openbis-extension/dataset.py index f9ee9c7..884c519 100644 --- a/jupyter-openbis-extension/dataset.py +++ b/jupyter-openbis-extension/dataset.py @@ -220,9 +220,9 @@ class DataSetUploadHandler(IPythonHandler): files = filenames, ) except Exception as e: - print(e) - errors.append({ - "create": 'Error while creating the dataset: {}'.format(e) + self.set_status(500) + self.write({ + "reason": 'Error while creating the dataset: {}'.format(e) }) # try to set the properties -- GitLab