Skip to content

Commit

Permalink
error strings should not be capitalized (ST1005)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sembeth committed Mar 30, 2024
1 parent e44cec9 commit 5b70dbd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions stripemanager/overview-manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,29 +44,29 @@ func (stripeConnection *StripeConnection) mapSubscriptionToSubscriptionOverview(

product, err := stripeConnection.GetProduct(c, productID)
if err != nil {
return SubscriptionOverviewReply{}, errors.New("Product not found")
return SubscriptionOverviewReply{}, errors.New("product not found")
}
reply.ProductName = product.Name

reply.Acive = &product.Active

metaData := product.Metadata
if err != nil {
return SubscriptionOverviewReply{}, errors.New("Product metadata not found")
return SubscriptionOverviewReply{}, errors.New("product metadata not found")
}
storageAmount, ok := metaData["storageAmount"]
if !ok {
return SubscriptionOverviewReply{}, errors.New("Storage amount not found")
return SubscriptionOverviewReply{}, errors.New("storage amount not found")
}
iStorageAmount, err := strconv.Atoi(storageAmount)
if err != nil {
stripeConnection.Log.Warn("Error converting storage amount to int", zap.Error(err))
return SubscriptionOverviewReply{}, errors.New("Error converting storage amount")
return SubscriptionOverviewReply{}, errors.New("error converting storage amount")
}
reply.StorageAmount = iStorageAmount
productType, ok := metaData["productType"]
if !ok {
return SubscriptionOverviewReply{}, errors.New("ProductType not found")
return SubscriptionOverviewReply{}, errors.New("productType not found")
}
reply.ProductType = productType

Expand Down

0 comments on commit 5b70dbd

Please sign in to comment.