fix(backend): dbErr 503 degradation for connection-class DB errors
This commit is contained in:
@@ -3,7 +3,6 @@ package api
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -31,8 +30,7 @@ func (a *api) libRoot(c *gin.Context, lib store.Library) (string, bool) {
|
||||
func (a *api) listLibraries(c *gin.Context) {
|
||||
libs, e := a.st.ListLibraries(c)
|
||||
if e != nil {
|
||||
log.Printf("db: %v", e)
|
||||
err(c, http.StatusInternalServerError, "internal", "db error")
|
||||
dbErr(c, e)
|
||||
return
|
||||
}
|
||||
out := make([]gin.H, 0, len(libs))
|
||||
|
||||
Reference in New Issue
Block a user