Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added clearer exception message
  • Loading branch information
Gschiavon committed Nov 28, 2017
commit 57d52c4917b8cd08e8e73bce9729f8a59afa6ffd
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,16 @@ private[mesos] class MesosSubmitRequestServlet(
private def buildDriverDescription(request: CreateSubmissionRequest): MesosDriverDescription = {
// Required fields, including the main class because python is not yet supported
val appResource = Option(request.appResource).getOrElse {
throw new SubmitRestMissingFieldException("Application jar is missing.")
throw new SubmitRestMissingFieldException("Application jar 'appResource' is missing.")
}
val mainClass = Option(request.mainClass).getOrElse {
throw new SubmitRestMissingFieldException("Main class is missing.")
throw new SubmitRestMissingFieldException("Main class 'mainClass' is missing.")
}
val appArgs = Option(request.appArgs).getOrElse {
throw new SubmitRestMissingFieldException("Application arguments are missing.")
throw new SubmitRestMissingFieldException("Application arguments 'appArgs' are missing.")
}
val environmentVariables = Option(request.environmentVariables).getOrElse {
throw new SubmitRestMissingFieldException("Environment variables are missing.")
throw new SubmitRestMissingFieldException("Environment variables 'environmentVariables' are missing.")
Copy link
Member

@felixcheung felixcheung Dec 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this is API changes - new required arguments for the request.
are folks ok with this?

(edit: it looks like previously-missing validation for a required arguments)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the arguments were assumed to be there, but validation was missing.

}

// Optional fields
Expand Down