Skip to content

Commit

Permalink
Fix error descriptions for catalogs
Browse files Browse the repository at this point in the history
  • Loading branch information
Robi9 committed Nov 3, 2023
1 parent c59f1e6 commit 2aa0647
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/models/catalog_products.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func loadCatalog(ctx context.Context, db *sqlx.DB, orgID OrgID) ([]assets.MsgCat

rows, err := db.Queryx(selectOrgCatalogSQL, orgID)
if err != nil && err != sql.ErrNoRows {
return nil, errors.Wrapf(err, "error querying external service for org: %d", orgID)
return nil, errors.Wrapf(err, "error querying catalog for org: %d", orgID)
}
defer rows.Close()

Expand All @@ -155,7 +155,7 @@ func loadCatalog(ctx context.Context, db *sqlx.DB, orgID OrgID) ([]assets.MsgCat
msgCatalog := &MsgCatalog{}
err := dbutil.ReadJSONRow(rows, &msgCatalog.c)
if err != nil {
return nil, errors.Wrapf(err, "error unmarshalling external service")
return nil, errors.Wrapf(err, "error unmarshalling catalog")
}
channelUUID, err := ChannelUUIDForChannelID(ctx, db, msgCatalog.ChannelID())
if err != nil {
Expand All @@ -166,7 +166,7 @@ func loadCatalog(ctx context.Context, db *sqlx.DB, orgID OrgID) ([]assets.MsgCat
catalog = append(catalog, msgCatalog)
}

logrus.WithField("elapsed", time.Since(start)).WithField("org_id", orgID).WithField("count", len(catalog)).Debug("loaded external services")
logrus.WithField("elapsed", time.Since(start)).WithField("org_id", orgID).WithField("count", len(catalog)).Debug("loaded catalog")

return catalog, nil
}
Expand Down

0 comments on commit 2aa0647

Please sign in to comment.