[ 
https://issues.apache.org/jira/browse/FLINK-8785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16413085#comment-16413085
 ] 

Jiayi commented on FLINK-8785:
------------------------------

[~Zentol] Thanks! I've reproduced the "internal server error" and run several 
unit tests of it. I find that the easiest way to return an error message is 
adding the "error.getMessage()": 

 
{code:java}
HandlerUtils.sendErrorResponse(
   ctx,
   httpRequest,
   new ErrorResponseBody("Internal server error. " + error.getMessage() + "."),
   HttpResponseStatus.INTERNAL_SERVER_ERROR,
   responseHeaders);
{code}
For example, if you submit an empty JobGraph, the response will be "[Internal 
server error.Could not start JobManager.]". If it's still not explicit enough, 
I can add more messages in "Dispatcher.submitJob" and the response will be 
"[Internal server error.Could not start JobManager.Could not set up 
JobManager.The given job is empty.]". The response is long but I can't do 
anything about it because the messages are delivered and combined between 
functions.

What do you think of my plan or do you have any suggestions ? 

 

> JobSubmitHandler does not handle JobSubmissionExceptions
> --------------------------------------------------------
>
>                 Key: FLINK-8785
>                 URL: https://issues.apache.org/jira/browse/FLINK-8785
>             Project: Flink
>          Issue Type: Bug
>          Components: Job-Submission, JobManager, REST
>    Affects Versions: 1.5.0
>            Reporter: Chesnay Schepler
>            Priority: Critical
>              Labels: flip-6
>
> If the job submission, i.e. {{DispatcherGateway#submitJob}} fails with a 
> {{JobSubmissionException}} the {{JobSubmissionHandler}} returns "Internal 
> server error" instead of signaling the failed job submission.
> This can for example occur if the transmitted execution graph is faulty, as 
> tested by the \{{JobSubmissionFailsITCase}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to