L
L
lightseeker2021-09-30 09:59:37
JavaScript
lightseeker, 2021-09-30 09:59:37

Why does try...catch sometimes fail to handle an error?

Here is a piece of code

try {
 const response = await axios.request(requestConfigurations)
} catch (err) {
   Log.error(err);
}


the matter is that sometimes try...catch does not catch an error and the server takes off.
something like

Error: Client network socket disconnected before secure TLS connection was established
   // call stack
   // hangs....

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2021-09-30
@402d

https://github.com/axios/axios/search?q=catch
Dig into the sources. Maybe sometimes 1 out of 20 ketch from the package itself works

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question