mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 18:35:51 +02:00
enhance: error handling #993
This commit is contained in:
parent
e77fd308e2
commit
163a84864a
22 changed files with 793 additions and 718 deletions
|
@ -26,13 +26,13 @@ func GetSiteList(c *gin.Context) {
|
|||
|
||||
configFiles, err := os.ReadDir(nginx.GetConfPath("sites-available"))
|
||||
if err != nil {
|
||||
cosy.ErrHandler(c, err)
|
||||
cosy.ErrHandler(c, cosy.WrapErrorWithParams(site.ErrReadDirFailed, err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
enabledConfig, err := os.ReadDir(nginx.GetConfPath("sites-enabled"))
|
||||
if err != nil {
|
||||
cosy.ErrHandler(c, err)
|
||||
cosy.ErrHandler(c, cosy.WrapErrorWithParams(site.ErrReadDirFailed, err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue