Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: removed fatal errors during onboarding #1518

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

AvineshTripathi
Copy link
Collaborator

Problem

During onboarding if the configurations are incorrect, the application crashes.

Solution

Proper handling of errors

Changes Made

Replaced Fatal error with normal error logging

}

for _, onDemand := range pricingResult.Terms.OnDemand {
for _, priceDimension := range onDemand.PriceDimensions {
hourlyCost, err = strconv.ParseFloat(priceDimension.PricePerUnit.USD, 64)
if err != nil {
log.Fatalf("Failed to parse hourly cost: %v", err)
log.Errorf("Failed to parse hourly cost: %v", err)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Program will still crash later because hourlycost won't have correct value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants