Skip to content

Commit

Permalink
Log to error instead of debug
Browse files Browse the repository at this point in the history
  • Loading branch information
jbygdell committed Nov 18, 2024
1 parent 02e6913 commit 8d31415
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sda/cmd/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ func deprecateC4ghHash(c *gin.Context) {
func listAllDatasets(c *gin.Context) {
datasets, err := Conf.API.DB.ListDatasets()
if err != nil {
log.Debugln("ListAllDatasets failed")
log.Errorf("ListAllDatasets failed, reason: %s", err.Error())
c.AbortWithStatusJSON(http.StatusInternalServerError, err.Error())

return
Expand All @@ -603,7 +603,7 @@ func listUserDatasets(c *gin.Context) {
username := strings.TrimPrefix(c.Param("username"), "/")
datasets, err := Conf.API.DB.ListUserDatasets(username)
if err != nil {
log.Debugln("ListUserDatasets failed")
log.Errorf("ListUserDatasets failed, reason: %s", err.Error())
c.AbortWithStatusJSON(http.StatusInternalServerError, err.Error())

return
Expand All @@ -620,7 +620,7 @@ func listDatasets(c *gin.Context) {
}
datasets, err := Conf.API.DB.ListUserDatasets(token.Subject())
if err != nil {
log.Debugln("ListDatasets failed")
log.Errorf("ListDatasets failed, reason: %s", err.Error())
c.AbortWithStatusJSON(http.StatusInternalServerError, err.Error())

return
Expand Down

0 comments on commit 8d31415

Please sign in to comment.