api: improve app create error message (#331)

api: improve app create error message
This commit is contained in:
C Cirello
2016-11-23 21:18:53 +01:00
committed by Pedro Nasser
parent f1fe2660e3
commit aa70f2e6ef

View File

@@ -44,7 +44,7 @@ func (s *Server) handleAppCreate(c *gin.Context) {
_, err = Api.Datastore.InsertApp(ctx, wapp.App)
if err != nil {
log.WithError(err).Errorln(models.ErrAppsCreate)
c.JSON(http.StatusInternalServerError, simpleError(models.ErrAppsCreate))
c.JSON(http.StatusInternalServerError, simpleError(err))
return
}