You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2022/07/12 00:41:47 UTC

[GitHub] [gobblin] Will-Lo commented on a diff in pull request #3516: [GOBBLIN-1656] Return a http status 503 on GaaS when quota is exceeded for user or flowgroup

Will-Lo commented on code in PR #3516:
URL: https://github.com/apache/gobblin/pull/3516#discussion_r918451533


##########
gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowConfigResourceLocalHandler.java:
##########
@@ -133,7 +134,13 @@ public CreateResponse createFlowConfig(FlowConfig flowConfig, boolean triggerLis
     if (!flowConfig.hasSchedule() && this.flowCatalog.exists(flowSpec.getUri())) {
       return new CreateResponse(new ComplexResourceKey<>(flowConfig.getId(), new EmptyRecord()), HttpStatus.S_409_CONFLICT);
     } else {
-      this.flowCatalog.put(flowSpec, triggerListener);
+      try {
+        this.flowCatalog.put(flowSpec, triggerListener);
+      } catch (Throwable e) {
+        if (e instanceof QuotaExceededException) {

Review Comment:
   We need to catch the generic throwable underneath though due to the function definition of the callback, but I think this look cleaner so I can add this.



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

To unsubscribe, e-mail: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org