Open hamza-shezad opened 12 months ago
Perhaps using a try...catch inside the wa.on like this:
wa.on("text", async (message) => {
try {
console.log(`Got message: ${message.data.text}`);
await wa.sendText(message.from, "Got message.");
} catch(error) {
console.error(error);
};
});
if it throws an exception, it should show up, but it doesn't. however, i will test using a try-catch later
in this simple app:
using
export WA_PHONE_NUMBER_ID="111111111111111"
(valid ID used in app, hidden here), the application runs without errors and successfully sends messages. however, withexport WA_PHONE_NUMBER_ID="111111111111111\n"
(notice extra\n
, could be any invalid ID), no error is output but the application fails to send messages.an error output is expected. if i make a
curl
request:i get a 400 error with the following message: