✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Express
У коді написано:
app.use((err, req, res) => {
res.status(500).json({ error: err.message });
});
Помилки в API все одно призводять до падіння з необробленою помилкою. Чому?