Skip to content

Commit

Permalink
Validate Detector Handle Request
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Jain <[email protected]>
  • Loading branch information
vibrantvarun committed Dec 5, 2022
1 parent 88771f0 commit cd105d9
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,10 @@ public RestValidateDetectorAction(ExtensionsRunner runner, AnomalyDetectorExtens

@Override
protected List<RouteHandler> routeHandlers() {
return List.of(new RouteHandler(POST, "/detectors/_validate", (r) -> handleRequest(r)));
return List.of(new RouteHandler(POST, "/detectors/_validate", (r) -> handleValidateDetectorRequest(r)));
}

@Override
public ExtensionRestResponse handleRequest(ExtensionRestRequest request) {
private ExtensionRestResponse handleValidateDetectorRequest(ExtensionRestRequest request) {
if (!EnabledSetting.isADPluginEnabled()) {
throw new IllegalStateException(CommonErrorMessages.DISABLED_ERR_MSG);
}
Expand Down

0 comments on commit cd105d9

Please sign in to comment.