Skip to content

Commit

Permalink
Error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Sembeth committed Mar 30, 2024
1 parent 2bb0f05 commit e44cec9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions stripemanager/payment-overview-manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import (

func (paymentHandler *PaymentHandler) GetPaymentMethodOverview(c context.Context, tokenDetails firebasemanager.TokenDetails) (PaymentMethodOverviewReply, error) {
cus, err := paymentHandler.GetCustomerByUID(c, tokenDetails.UID)
if err != nil {
return PaymentMethodOverviewReply{}, err
}
stripe.Key = paymentHandler.StripeConnection.Key
if cus.InvoiceSettings == nil {
return PaymentMethodOverviewReply{}, errors.New("InvoiceSettings not found")
Expand Down

0 comments on commit e44cec9

Please sign in to comment.