phase 2 rework
This commit is contained in:
1 parent
20054198f3
commit
b397ea9256
44 files changed
+5528
-1377
No files matched your search
@@ -22,7 +22,7 @@ function handleHttpError(error, req, res, next) {
|
||||
const message = tooLarge
|
||||
? 'Request too large. The maximum request size is 32 KiB.'
|
||||
: invalid ? 'Invalid request body.' : 'The request could not be completed. Check the server configuration and try again.';
|
||||
if (req.is?.('application/json') || req.path?.startsWith('/pm2/') || req.path === '/status-data') {
|
||||
if (req.is?.('application/json') || req.path?.startsWith('/pm2/') || ['/status-data', '/status-summary', '/dashboard-data'].includes(req.path)) {
|
||||
return res.status(status).json({ ok: false, error: message });
|
||||
}
|
||||
return res.status(status).render('error', { title: 'Request failed', message, details: null });
|
||||
|
||||
Reference in new issue
Block a user