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

ASF GitHub Bot logged work on GOBBLIN-1154:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/May/20 21:55
            Start Date: 21/May/20 21:55
    Worklog Time Spent: 10m 
      Work Description: jack-moseley commented on a change in pull request 
#2993:
URL: https://github.com/apache/incubator-gobblin/pull/2993#discussion_r428937502



##########
File path: 
gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowExecutionResource.java
##########
@@ -65,8 +66,11 @@ public FlowExecutionResource() {}
    */
   @Override
   public FlowExecution get(ComplexResourceKey<FlowStatusId, EmptyRecord> key) {
-    // this returns null to raise a 404 error if flowStatus is null
-    return convertFlowStatus(getFlowStatusFromGenerator(key, 
this._flowStatusGenerator));
+    FlowExecution flowExecution = 
convertFlowStatus(getFlowStatusFromGenerator(key, this._flowStatusGenerator));
+    if (flowExecution == null) {
+      throw new RestLiServiceException(HttpStatus.S_404_NOT_FOUND, "No flow 
execution found for flowStatusId " + key.getKey());

Review comment:
       It would mean either wrong flow id or the flow status was cleaned up.




----------------------------------------------------------------
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: 436226)
    Time Spent: 1.5h  (was: 1h 20m)

> Improve gaas error messages
> ---------------------------
>
>                 Key: GOBBLIN-1154
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1154
>             Project: Apache Gobblin
>          Issue Type: Improvement
>            Reporter: Jack Moseley
>            Priority: Major
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to