Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6222#discussion_r199333683
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/JobSubmitHandler.java
 ---
    @@ -66,6 +67,9 @@ public JobSubmitHandler(
                }
     
                return gateway.submitJob(jobGraph, timeout)
    -                   .thenApply(ack -> new JobSubmitResponseBody("/jobs/" + 
jobGraph.getJobID()));
    +                   .thenApply(ack -> new JobSubmitResponseBody("/jobs/" + 
jobGraph.getJobID()))
    +                   .exceptionally(exception -> {
    +                           throw new CompletionException(new 
RestHandlerException("Job submission failed.", 
HttpResponseStatus.INTERNAL_SERVER_ERROR, exception));
    --- End diff --
    
    I see your point. I'm just wondering whether some bits of context wouldn't 
be helpful on the client side when using the CLI. So for example if the job was 
misconfigured or if it was already submitted to the cluster in HA mode, then it 
would be helpful for the user to know.


---

Reply via email to