Timeouts handling
system info
| Haraka | Haraka.js — Version: 2.8.25 |
|---|---|
| Node | v8.10.0 |
| OS | Linux mabe-OMEN 5.3.0-26-generic #28~18.04.1-Ubuntu SMP Wed Dec 18 16:40:14 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
| openssl | OpenSSL 1.1.1 11 Sep 2018 |
Expected behavior
I would like to know if there is a way in which I can catch any timeout error inside a custom plugin, or better, if I can catch any timeout that pops from any plugin.
AFAIK, that's impossible to do en-masse. It's up to you to handle whatever timeout or any other error is thrown inside your plugin. You can do everything you want as long as you don't exceed plugin's configured timeout
Yes, there's several ways. The question is what you want to do with the catches. We've got examples in several plugins that catch the timeouts and do things with them. Feel free to reply with a more specific question and maybe we can provide a more specific answer.