mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Improvements on API error, swagger and status code (#428)
* improvements on API error, swagger and status code * missing validation * removing typo * fix if-within-if * fix handle app delete
This commit is contained in:
@@ -17,8 +17,8 @@ func (s *Server) handleAppList(c *gin.Context) {
|
||||
|
||||
apps, err := s.Datastore.GetApps(ctx, filter)
|
||||
if err != nil {
|
||||
log.WithError(err).Debug(models.ErrAppsList)
|
||||
c.JSON(http.StatusInternalServerError, simpleError(models.ErrAppsList))
|
||||
log.WithError(err).Error(models.ErrAppsList)
|
||||
c.JSON(http.StatusInternalServerError, simpleError(ErrInternalServerError))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user