Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Put try catch at the top level and scatter a couple of console.logs at different steps with the results of calculations and explanatory text. More or less like this:
try {
const result = do(); // какая-то "бизнес"-логика
console.info('Запрос успешно выполнился с результатом: ', result);
return result;
} catch (err) {
console.error('Запрос упал со следующей ошибкой: ', err);
return 'Захват человечества остановлен'
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question