Skip to content

Commit 0d48b6c

Browse files
authored
remove log.Fatal and return error to avoid early program termination (#403)
1 parent 5671e7a commit 0d48b6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/tasks/tags/tags.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package tags
22

33
import (
4-
"log"
4+
"fmt"
55

66
brokertags "github.com/cloud-gov/go-broker-tags"
77
)
@@ -15,7 +15,7 @@ func GenerateTags(tagManager brokertags.TagManager, serviceOfferingName string,
1515
true,
1616
)
1717
if err != nil {
18-
log.Fatalf("error generating new tags for database %s", err)
18+
return map[string]string{}, fmt.Errorf("error generating new tags for database %s", err)
1919
}
2020
// We can ignore the timestamp tags, if they exist
2121
delete(generatedTags, "Created at")

0 commit comments

Comments
 (0)