Skip to content

Commit

Permalink
fix(app): default app
Browse files Browse the repository at this point in the history
  • Loading branch information
hekike committed Dec 29, 2024
1 parent cdd7219 commit 539caa1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions openmeter/app/httpdriver/marketplace.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ func (h *handler) MarketplaceAppAPIKeyInstall() MarketplaceAppAPIKeyInstallHandl
return req, nil
},
func(ctx context.Context, request MarketplaceAppAPIKeyInstallRequest) (MarketplaceAppAPIKeyInstallResponse, error) {
resp := MarketplaceAppAPIKeyInstallResponse{}
resp := MarketplaceAppAPIKeyInstallResponse{
DefaultForCapabilityTypes: []api.AppCapabilityType{},
}

installedApp, err := h.service.InstallMarketplaceListingWithAPIKey(ctx, request)
if err != nil {
Expand All @@ -144,7 +146,7 @@ func (h *handler) MarketplaceAppAPIKeyInstall() MarketplaceAppAPIKeyInstallHandl

resp.Error = lo.ToPtr(err.Error())
} else {
return resp, fmt.Errorf("make stripe app default billing profile")
return resp, fmt.Errorf("make stripe app default billing profile: %w", err)
}
}

Expand Down
4 changes: 2 additions & 2 deletions openmeter/app/stripe/adapter/stripe.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,8 @@ func (a adapter) GetSupplierContact(ctx context.Context, input appstripeentity.G

// Get Stripe Account
stripeAccount, err := stripeAppClient.GetAccount(ctx)
if err == nil {
return billing.SupplierContact{}, fmt.Errorf("failed to get stripe account for: %w", err)
if err != nil {
return billing.SupplierContact{}, fmt.Errorf("failed to get stripe account: %w", err)
}

if stripeAccount.BusinessProfile == nil || stripeAccount.BusinessProfile.Name == "" {
Expand Down

0 comments on commit 539caa1

Please sign in to comment.