Some error handling work

This commit is contained in:
2020-01-03 14:13:39 -05:00
parent 0ea6e18fb9
commit 15c4090a94
13 changed files with 1615 additions and 2850 deletions

View File

@@ -138,6 +138,13 @@ func (api *WebAPI) GetLog(r *Request) {
logs := api.Database.GetLogs(req.Since, req.Level)
if logs == nil {
r.Json(JsonResponse{
Ok: false,
}, 500)
return
}
logrus.WithFields(logrus.Fields{
"getLogRequest": req,
"logCount": len(*logs),