Added general error instead of axios error

pull/4558/head
Simon Nilsson 1 month ago committed by GitHub
parent e0f1216ef5
commit 446724b1f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -105,13 +105,13 @@ class Cellsynt extends NotificationProvider {
} }
const resp = await axios.post("https://se-1.cellsynt.net/sms.php", null, data); const resp = await axios.post("https://se-1.cellsynt.net/sms.php", null, data);
if (resp.data == null || resp.data.includes("Error")) { if (resp.data == null || resp.data.includes("Error")) {
this.throwGeneralAxiosError(resp.data); throw new Error(resp.data);
}else{
return okMsg;
} }
} catch (error) { } catch (error) {
this.throwGeneralAxiosError(error); this.throwGeneralAxiosError(error);
} }
return okMsg;
} }
} }

Loading…
Cancel
Save