mirror of
https://github.com/xiaoxinpro/nginx-proxy-manager-zh.git
synced 2025-01-22 12:58:13 -05:00
Adds error stack information in prod environment for certificates
This commit is contained in:
parent
3fec135fe5
commit
07e78aec48
@ -66,7 +66,7 @@ app.use(function (err, req, res, next) {
|
||||
}
|
||||
};
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
if (process.env.NODE_ENV === 'development' || (req.baseUrl + req.path).includes('nginx/certificates')) {
|
||||
payload.debug = {
|
||||
stack: typeof err.stack !== 'undefined' && err.stack ? err.stack.split('\n') : null,
|
||||
previous: err.previous
|
||||
|
@ -187,7 +187,7 @@ module.exports = Mn.View.extend({
|
||||
})
|
||||
.catch(err => {
|
||||
let more_info = '';
|
||||
if(err.code === 500){
|
||||
if(err.code === 500 && err.debug){
|
||||
try{
|
||||
more_info = JSON.parse(err.debug).debug.stack.join("\n");
|
||||
} catch(e) {}
|
||||
|
@ -193,7 +193,7 @@ module.exports = Mn.View.extend({
|
||||
})
|
||||
.catch(err => {
|
||||
let more_info = '';
|
||||
if(err.code === 500){
|
||||
if(err.code === 500 && err.debug){
|
||||
try{
|
||||
more_info = JSON.parse(err.debug).debug.stack.join("\n");
|
||||
} catch(e) {}
|
||||
|
@ -228,7 +228,7 @@ module.exports = Mn.View.extend({
|
||||
})
|
||||
.catch(err => {
|
||||
let more_info = '';
|
||||
if(err.code === 500){
|
||||
if(err.code === 500 && err.debug){
|
||||
try{
|
||||
more_info = JSON.parse(err.debug).debug.stack.join("\n");
|
||||
} catch(e) {}
|
||||
|
@ -195,7 +195,7 @@ module.exports = Mn.View.extend({
|
||||
})
|
||||
.catch(err => {
|
||||
let more_info = '';
|
||||
if(err.code === 500){
|
||||
if(err.code === 500 && err.debug){
|
||||
try{
|
||||
more_info = JSON.parse(err.debug).debug.stack.join("\n");
|
||||
} catch(e) {}
|
||||
|
Loading…
Reference in New Issue
Block a user