diff --git a/features/lm/file_export/controller.go b/features/lm/file_export/controller.go index 5fba6abb..9ce7fdff 100644 --- a/features/lm/file_export/controller.go +++ b/features/lm/file_export/controller.go @@ -73,8 +73,9 @@ func (m *FileExport) GetFileList(c *gin.Context) { files, err := file.GetFileInfo(querys.Path, querys.Suffix) if err != nil { - log.Error(err) + log.Error("failed to GetFileInfo:", err) c.JSON(http.StatusInternalServerError, services.ErrResp(err.Error())) + return } // split files list @@ -98,7 +99,7 @@ func (m *FileExport) Total(c *gin.Context) { fileCount, dirCount, err := file.GetFileAndDirCount(dir) if err != nil { - log.Error(err) + log.Error("failed to GetFileAndDirCount:", err) c.JSON(http.StatusInternalServerError, services.ErrResp(err.Error())) return }