Skip to content

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

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