fix crash on invalid res

This commit is contained in:
jjanzen 2025-01-16 23:48:31 -06:00
parent 0046702a0b
commit ae976a0caa

3
app.js
View file

@ -52,7 +52,8 @@ function handle_application_command(state, data, channel_id) {
default:
console.error(`unknown command: ${name}`);
return res.status(400).json({ error: "unknown command" });
if (res) return res.status(400).json({ error: "unknown command" });
else return null;
}
}