Skip to content

Commit

Permalink
chore: add error logging to profile creation
Browse files Browse the repository at this point in the history
  • Loading branch information
robinmuhia committed Jul 26, 2024
1 parent 5df023f commit 6ca2561
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions healthcrm.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,7 @@ func (h *HealthCRMLib) CreateProfile(ctx context.Context, profile *ProfileInput)
}

if response.StatusCode != http.StatusAccepted {
err := fmt.Errorf("unexpected status %v returned", response.StatusCode)
return nil, err
return nil, errors.New(string(respBytes))
}

var profileResponse *ProfileOutput
Expand Down

0 comments on commit 6ca2561

Please sign in to comment.