From a9da76621c1be7a11bf292e868a8f7c22f2ea203 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Sun, 26 Mar 2023 21:20:42 +0100 Subject: bug(web): Inform user when deleted topology is still used This change fixes #135 which showed that trying to delete a topology used by a scenario would result in nothing happening in the UI and a 500 error being returned by the server. We check whether a scenario still references the topology and show an error to the user if that happens. Fixes #135 --- opendc-web/opendc-web-ui/src/api/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'opendc-web/opendc-web-ui/src/api/index.js') diff --git a/opendc-web/opendc-web-ui/src/api/index.js b/opendc-web/opendc-web-ui/src/api/index.js index 75751658..3411b96e 100644 --- a/opendc-web/opendc-web-ui/src/api/index.js +++ b/opendc-web/opendc-web-ui/src/api/index.js @@ -49,7 +49,7 @@ export async function request(auth, path, method = 'GET', body) { const json = await response.json() if (!response.ok) { - throw response.message + throw json.message } return json -- cgit v1.2.3