From c9630401f5798850793a6208a0822d7889ec1bec Mon Sep 17 00:00:00 2001 From: Niko PLP Date: Sun, 14 Jul 2024 19:17:17 +0300 Subject: [PATCH] error handling --- ng-app/src/api.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ng-app/src/api.ts b/ng-app/src/api.ts index 98ff106..e5db6e9 100644 --- a/ng-app/src/api.ts +++ b/ng-app/src/api.ts @@ -215,7 +215,11 @@ const handler = { return await tauri.invoke(path[0],arg) } }catch (e) { - throw JSON.parse(e); + try { + throw JSON.parse(e); + } catch (f) { + throw e; + } } } },