Skip to content

Commit

Permalink
fix(kubernetes): improve error messaging around invalid service names
Browse files Browse the repository at this point in the history
  • Loading branch information
maggieneterval committed Aug 23, 2019
1 parent 287b7bf commit 831e118
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ private void op(String loadBalancerName, KubernetesManifest target) {
name = KubernetesManifest.fromFullResourceName(loadBalancerName);
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException(
"Load balancers must be specified in the form '<kind> <name>', e.g. 'service my-service'",
String.format(
"Failed to perform operation with load balancer '%s'. Load balancers must be specified in the form '{kind} {name}', e.g. 'service my-service'",
loadBalancerName),
e);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ private void attachLoadBalancer(String loadBalancerName, KubernetesManifest targ
name = KubernetesManifest.fromFullResourceName(loadBalancerName);
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException(
"Load balancers must be specified in the form '<kind> <name>', e.g. 'service my-service'",
String.format(
"Failed to attach load balancer '%s'. Load balancers must be specified in the form '{kind} {name}', e.g. 'service my-service'.",
loadBalancerName),
e);
}

Expand Down

0 comments on commit 831e118

Please sign in to comment.