mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
enhance: replace error handling with cosy wrapper for nginx reload and test failures
This commit is contained in:
parent
c5e80fb98a
commit
d789326230
14 changed files with 57 additions and 43 deletions
|
@ -76,9 +76,7 @@ func AddConfig(c *gin.Context) {
|
|||
|
||||
output := nginx.Reload()
|
||||
if nginx.GetLogLevel(output) >= nginx.Warn {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{
|
||||
"message": output,
|
||||
})
|
||||
cosy.ErrHandler(c, cosy.WrapErrorWithParams(config.ErrNginxReloadFailed, output))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue