jack-moseley commented on a change in pull request #2993:
URL: https://github.com/apache/incubator-gobblin/pull/2993#discussion_r428936777



##########
File path: 
gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowConfigV2ResourceLocalHandler.java
##########
@@ -81,7 +83,7 @@ public CreateKVResponse createFlowConfig(FlowConfig 
flowConfig, boolean triggerL
     } else if 
(Boolean.parseBoolean(responseMap.getOrDefault(ServiceConfigKeys.COMPILATION_SUCCESSFUL,
 new AddSpecResponse<>("false")).getValue().toString())) {
       httpStatus = HttpStatus.S_201_CREATED;
     } else {
-      httpStatus = HttpStatus.S_400_BAD_REQUEST;
+      throw new RestLiServiceException(HttpStatus.S_400_BAD_REQUEST, "Flow was 
not compiled successfully");

Review comment:
       The challenge is that if a flow doesn't compile it's hard to know why 
because we don't know what was the intended path. It could be because of 
missing edges/nodes, or unresolved config keys. It's something that could be 
improved upon still, but most users of gaas self-serve should be using edges 
we've already defined so probably shouldn't have this problem anyway.




----------------------------------------------------------------
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


Reply via email to