Enforce no-throw-literal rule in ESLint (#6418)

This commit is contained in:
Louis Lam
2025-11-26 16:10:06 +08:00
committed by GitHub
parent 5c83b17992
commit 892bd42dae
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ class Webhook extends NotificationProvider {
...JSON.parse(notification.webhookAdditionalHeaders)
};
} catch (err) {
throw "Additional Headers is not a valid JSON";
throw new Error("Additional Headers is not a valid JSON");
}
}