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:
Pedro Nasser
2016-12-13 19:18:52 -02:00
committed by GitHub
parent 34d6c6e101
commit 32de7d5361
13 changed files with 103 additions and 88 deletions

View File

@@ -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
}