We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c477e83 commit a07ab1fCopy full SHA for a07ab1f
backend/fetchNewMessages.js
@@ -177,7 +177,15 @@ async function fetchNewMessages(client) {
177
178
const pullusers = await loadConfigVar("pullusers");
179
const mudtoken = await loadConfigVar("mudtoken");
180
- const apiUrl = 'https://www.hackmud.com/mobile/chats.json';
+ let apiUrl;
181
+ try {
182
+ apiUrl = 'https://www.hackmud.com/mobile/chats.json';
183
+ } catch (error) {
184
+ console.log("There was an error trying to connect to the API.");
185
+ console.log(error);
186
+ return;
187
+ }
188
+
189
const payload = {
190
chat_token: mudtoken,
191
usernames: pullusers,
0 commit comments