matthew1232 / discord-webhook-node

Allows for easy webhook sending through discord's webhook API
MIT License
94 stars 38 forks source link

Even with a try catch this error is never caught. #42

Open dracoDevs opened 3 years ago

dracoDevs commented 3 years ago
            if (this.throwErrors) throw new Error(err.message);
                                        ^

Error: Error sending webhook: 404 status code. Response: {"message": "Unknown Webhook", "code": 10015}
    at Webhook.send (C:\Users\Draco\Desktop\Programs\Github Projects\Discord Bots\BeamBot\node_modules\discord-webhook-node\src\classes\webhook.js:74:41)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

The above error is a result of a bad webhook being passed in I have a try catch around the bit of code that throws this error but it fails to catch and continues to throw this error instead of going through my handling.

OmgImAlexis commented 2 years ago

Are you calling await on the function? Please add a code sample.