fix(backend): dbErr 503 degradation for connection-class DB errors
This commit is contained in:
@@ -33,7 +33,7 @@ func (a *api) putProgress(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
if e := a.st.UpsertProgress(c, uid(c), b.LibraryID, b.Path, req.Locator, req.Percent); e != nil {
|
||||
err(c, http.StatusInternalServerError, "internal", "db error")
|
||||
dbErr(c, e)
|
||||
return
|
||||
}
|
||||
c.Status(http.StatusNoContent)
|
||||
@@ -42,7 +42,7 @@ func (a *api) putProgress(c *gin.Context) {
|
||||
func (a *api) listProgress(c *gin.Context) {
|
||||
rows, e := a.st.ListProgress(c, uid(c))
|
||||
if e != nil {
|
||||
err(c, http.StatusInternalServerError, "internal", "db error")
|
||||
dbErr(c, e)
|
||||
return
|
||||
}
|
||||
out := make([]gin.H, 0, len(rows))
|
||||
|
||||
Reference in New Issue
Block a user