summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2023-04-13 15:06:07 +0200
committerHarald Musum <musum@yahooinc.com>2023-04-13 15:06:07 +0200
commitf95354bf26d37b9cca812d49c10e3f8d95899c5d (patch)
tree249ae7c5baff0b36bce99a522f3d4f551807deb5 /controller-server
parent1406f2c7124198e4fe05650719a9d33d2737d5b3 (diff)
Add link to doc for exception when plan does not support deployment
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java4
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java3
2 files changed, 4 insertions, 3 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java
index 80098ff8ca9..08a8440fbe2 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java
@@ -1064,10 +1064,10 @@ public class ApplicationController {
var planId = controller.serviceRegistry().billingController().getPlan(tenantName);
Optional<Plan> plan = controller.serviceRegistry().planRegistry().plan(planId);
if (plan.isEmpty())
- throw new IllegalArgumentException("Tenant '" + tenantName.value() + "' has no plan, not allowed to deploy");
+ throw new IllegalArgumentException("Tenant '" + tenantName.value() + "' has no plan, not allowed to deploy. See https://cloud.vespa.ai/support");
if (plan.get().quota().calculate().equals(Quota.zero()))
throw new IllegalArgumentException("Tenant '" + tenantName.value() + "' has a plan '" +
- plan.get().displayName() + "' with zero quota, not allowed to deploy");
+ plan.get().displayName() + "' with zero quota, not allowed to deploy. See https://cloud.vespa.ai/support");
}
}
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java
index c641aaf0c85..a9a6fe602b6 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java
@@ -1523,7 +1523,8 @@ public class ControllerTest {
tester.controller().applications().verifyPlan(tenant);
fail("should have thrown an exception");
} catch (IllegalArgumentException e) {
- assertEquals("Tenant 'tenant' has a plan 'None Plan - for testing purposes' with zero quota, not allowed to deploy", e.getMessage());
+ assertEquals("Tenant 'tenant' has a plan 'None Plan - for testing purposes' with zero quota, not allowed to deploy. " +
+ "See https://cloud.vespa.ai/support", e.getMessage());
}
}