Skip to content

Commit

Permalink
check for nulls (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Graff committed Jan 2, 2018
1 parent 8f19dc2 commit 2c9754b
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,14 @@ public CanaryExecutionResponse initiateCanaryWithConfig(
AccountCredentials.Type.OBJECT_STORE,
accountCredentialsRepository);

return buildExecution("adhoc",
if (canaryAdhocExecutionRequest.getCanaryConfig() == null) {
throw new IllegalArgumentException("canaryConfig must be provided for ad-hoc requests");
}
if (canaryAdhocExecutionRequest.getExecutionRequest() == null) {
throw new IllegalArgumentException("executionRequest must be provided for ad-hoc requests");
}

return buildExecution("ad-hoc",
canaryAdhocExecutionRequest.getCanaryConfig(),
null,
resolvedMetricsAccountName,
Expand Down

0 comments on commit 2c9754b

Please sign in to comment.