1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00

update deps

This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-11-25 04:47:36 +02:00
parent 763300b566
commit afa1d89a23
8 changed files with 125 additions and 37 deletions

View File

@@ -168,6 +168,11 @@ func (h *CategoryHandler) Delete(ctx iris.Context) {
affected, err := h.service.DeleteByID(ctx.Request().Context(), id)
if err != nil {
if err == sql.ErrNoRows {
writeEntityNotFound(ctx)
return
}
debugf("CategoryHandler.Delete(DB): %v", err)
writeInternalServerError(ctx)
return
@@ -201,7 +206,7 @@ func (h *CategoryHandler) ListProducts(ctx iris.Context) {
var products entity.Products
err := h.service.List(ctx.Request().Context(), &products, opts)
if err != nil {
if err != nil && err != sql.ErrNoRows {
debugf("CategoryHandler.ListProducts(DB) (table=%s where=%s=%v limit=%d offset=%d): %v",
opts.Table, opts.WhereColumn, opts.WhereValue, opts.Limit, opts.Offset, err)