Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
arvindh123 authored Feb 19, 2024
1 parent 56d00a4 commit 40cf9ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bootstrap/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ func (bs bootstrapService) Add(ctx context.Context, token string, cfg Config) (C

saved, err := bs.configs.Save(ctx, cfg, toConnect)
if err != nil {
// If id is empty, then a new thing has been created function - bs.thing(id, token)
// So, on bootstrap config save error , delete the newly created thing.
// If the ID is empty, a new thing has been created by bs.thing(id, token),
// so if the bootstrap config creation returns an error, try to delete the newly created thing.
if id == "" {
if errT := bs.sdk.DeleteThing(cfg.ThingID, token); errT != nil {
err = errors.Wrap(err, errT)
Expand Down

0 comments on commit 40cf9ea

Please sign in to comment.