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

    https://github.com/apache/flink/pull/5220#discussion_r159430427
  
    --- Diff: 
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java ---
    @@ -587,9 +526,7 @@ protected int cancel(String[] args) {
                        try {
                                jobId = new 
JobID(StringUtils.hexStringToByte(jobIdString));
                        } catch (Exception e) {
    -                           LOG.error("Error: The value for the Job ID is 
not a valid ID.");
    -                           System.out.println("Error: The value for the 
Job ID is not a valid ID.");
    -                           return 1;
    +                           throw new CliArgsException("The value for the 
JobID is not a valid ID: " + e.getMessage());
    --- End diff --
    
    Maybe log the input value as well
    ```
        try {
                        new 
JobID(StringUtils.hexStringToByte("dea84ec368d886f1638c01447ec6951"));
                } catch (Exception e) {
                        throw new CliArgsException("The value for the JobID is 
not a valid ID: " + e.getMessage());
                }
    ```
    message is:
    ```
    The value for the JobID is not a valid ID: Argument bytes must by an array 
of 16 bytes
    ```
    
    Also, this piece of code is duplicated.


---

Reply via email to