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

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

                Author: ASF GitHub Bot
            Created on: 19/Aug/19 17:48
            Start Date: 19/Aug/19 17:48
    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_r315333579
 
 

 ##########
 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:
   Since they are runtime exceptions, nothing is required to declare that they 
are thrown in their method signatures and can propagate up the call stack from 
any arbitrary location until they hit an appropriately scoped catch statement.
   
   Without the change to also catch the StatusRuntimeException as part of the 
StatusException, they would be caught as part of the Exception block and 
converted to INTERNAL errors.
 
----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 297331)
    Time Spent: 1h  (was: 50m)

> 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: 1h
>  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
(v8.3.2#803003)

Reply via email to