phet commented on code in PR #3516:
URL: https://github.com/apache/gobblin/pull/3516#discussion_r910859880
##########
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:
just musing for a moment... would it be equivalent to phrase as simply?
```
} catch (QuotaExceededException e) {
throw new ...
```
? (i.e. let the `catch` do the RTTI for you implicitly)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]