[ 
https://issues.apache.org/jira/browse/BEAM-7720?focusedWorklogId=296339&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-296339
 ]

ASF GitHub Bot logged work on BEAM-7720:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Aug/19 15:31
            Start Date: 16/Aug/19 15:31
    Worklog Time Spent: 10m 
      Work Description: lukecwik commented on pull request #9347: [BEAM-7720] 
Fix the exception type of InMemoryJobService when job id not found
URL: https://github.com/apache/beam/pull/9347#discussion_r314770165
 
 

 ##########
 File path: 
runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/jobsubmission/InMemoryJobService.java
 ##########
 @@ -253,6 +253,8 @@ public void getState(
       GetJobStateResponse response = 
GetJobStateResponse.newBuilder().setState(state).build();
       responseObserver.onNext(response);
       responseObserver.onCompleted();
+    } catch (StatusException e) {
 
 Review comment:
   ```suggestion
       } catch (StatusRuntimeException | StatusException e) {
   ```
   
   Here and everywhere else otherwise the catch Exception will also convert the 
StatusRuntimeException to an `INTERNAL` status error.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 296339)
    Time Spent: 40m  (was: 0.5h)

> Fix the exception type of InMemoryJobService when job id not found
> ------------------------------------------------------------------
>
>                 Key: BEAM-7720
>                 URL: https://issues.apache.org/jira/browse/BEAM-7720
>             Project: Beam
>          Issue Type: Bug
>          Components: beam-model
>            Reporter: Chad Dombrova
>            Assignee: Chad Dombrova
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> The contract in beam_job_api.proto for `CancelJobRequest`, 
> `GetJobStateRequest`, and `GetJobPipelineRequest` states:
>   
> {noformat}
> // Throws error NOT_FOUND if the jobId is not found{noformat}
>   
> However, `InMemoryJobService` is handling this exception incorrectly by 
> rethrowing `NOT_FOUND` exceptions as `INTERNAL`.
> neither `JobMessagesRequest` nor `GetJobMetricsRequest` state their contract 
> wrt exceptions, but they should probably be updated to handle `NOT_FOUND` in 
> the same way.
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to