From 446724b1f1058c707bf2fe93f4714c8335655832 Mon Sep 17 00:00:00 2001 From: Simon Nilsson Date: Wed, 27 Mar 2024 19:32:18 +0100 Subject: [PATCH] Added general error instead of axios error --- server/notification-providers/cellsynt.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/notification-providers/cellsynt.js b/server/notification-providers/cellsynt.js index 1a654d22..ca0901c3 100644 --- a/server/notification-providers/cellsynt.js +++ b/server/notification-providers/cellsynt.js @@ -105,13 +105,13 @@ class Cellsynt extends NotificationProvider { } const resp = await axios.post("https://se-1.cellsynt.net/sms.php", null, data); if (resp.data == null || resp.data.includes("Error")) { - this.throwGeneralAxiosError(resp.data); + throw new Error(resp.data); + }else{ + return okMsg; } } catch (error) { this.throwGeneralAxiosError(error); } - - return okMsg; } }