ЕМ
const res = await apiFetch(/api/subscriptions/test/subs/${pageNumber}/${nameFilter}, {...}).
Size: a a a
ЕМ
const res = await apiFetch(/api/subscriptions/test/subs/${pageNumber}/${nameFilter}, {...}).
EA
/${pageNumber}?${nameFilter}
на фронте, вероятно.EA
query.name
сделать опциональным?'/test/subs/:current_page?name?'
?ЕМ
EA
А
function db(sqlQuery, sqlPlacesholder, callback) {
pool.getConnection((err, connection) => {
if (err) throw err; // not connected!
// Use the connection
connection.query(sqlQuery, sqlPlacesholder, (error, results, fields) => {
// When done with the connection, release it.
connection.release();
// Handle error after the release.
if (error) throw error;
// Don't use the connection here, it has been returned to the pool.
callback(err, results);
});
// !!!!!!! ТУТ ЛОВИМ ECONNRESET
connection.on('error', err => {
console.log(err); // 'ER_BAD_DB_ERROR'
});
});
}
нода теперь на утечку памяти ругаетсяMaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit
M
M
АП
M
M
a
ВЕ
V
V
OZ