Skip to content

Commit 0a428dc

Browse files
committed
fix: stop execution if arc instance is not present
1 parent a1e8730 commit 0a428dc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

util/billing.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ func getClusterPlan(clusterID string) (ClusterPlan, error) {
243243
return clusterPlan, nil
244244
}
245245

246-
// GetClusterPlan fetches the cluster plan & sets the Tier value
246+
// SetClusterPlan fetches the cluster plan & sets the Tier value
247247
func SetClusterPlan() {
248248
log.Printf("=> Getting cluster plan details")
249249
clusterID := os.Getenv("CLUSTER_ID")
@@ -253,7 +253,7 @@ func SetClusterPlan() {
253253
}
254254
_, err := getClusterPlan(clusterID)
255255
if err != nil {
256-
log.Fatalln("Unable to fetch the cluster plan. Please make sure that you're using a valid CLUSTER_ID.", err)
256+
log.Fatalln("Unable to fetch the cluster plan. Please make sure that you're using a valid CLUSTER_ID. If the issue persists please contact support@appbase.io with your ARC_ID or registered e-mail address.", err)
257257
return
258258
}
259259
}
@@ -339,7 +339,7 @@ func ReportUsage() {
339339

340340
result, err := getArcInstance(arcID)
341341
if err != nil {
342-
log.Println("Unable to fetch the arc instance. Please make sure that you're using a valid ARC_ID.")
342+
log.Fatalln("Unable to fetch the arc instance. Please make sure that you're using a valid ARC_ID. If the issue persists please contact support@appbase.io with your ARC_ID or registered e-mail address.")
343343
return
344344
}
345345

@@ -389,7 +389,7 @@ func ReportHostedArcUsage() {
389389
// getArcClusterInstance(clusterId)
390390
result, err := getArcClusterInstance(clusterID)
391391
if err != nil {
392-
log.Println("Unable to fetch the arc instance. Please make sure that you're using a valid CLUSTER_ID.", err)
392+
log.Fatalln("Unable to fetch the arc instance. Please make sure that you're using a valid CLUSTER_ID. If the issue persists please contact support@appbase.io with your ARC_ID or registered e-mail address.", err)
393393
return
394394
}
395395

0 commit comments

Comments
 (0)