I tried to search the forums but I can’t find any information (yet). So far, from my search, the possible solution is to implement the Wappler Bull Queues extension. But it is somewhat complicated for my part as I need to use REDIS.
I would like to know if someone has a solution already implemented for my inquiry.
What I would like to do is to check first if a 3rd-party API endpoint is online before I send a query via API.
What is currently happening from what I understand is that nodejs connects to the 3rd-pary API endpoint and will timeout (ETIMEDOUT error) after several seconds. I would like to catch this timeout error and reflect in my dashboard that the API servers are offline. If it is not possible to catch this, then is there a way to check whether that API endpoint is offline or online?
Using the Wappler Bull Queues extension will allow me to use a timeout in connecting to the 3rd-party API. Is there any other solution?
Basically you want an API Action step with timeout, you started to overcomplicate when you added Bull MQ to the discussion
No one does this exact solution, use the timeout option for the API Action instead. You can make use of Try/Catch step to mark somewhere (e.g. in your database) the API Action is offline (Catch)
I haven’t personally tested if it works, I guess you’ll need to test it
Ken (the creator of that topic) is a well-known Wappler expert, therefore unless proven otherwise I believe his solution is valid (despite the lack of confirmation).