Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Send back error response when failing to stop detector #45

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public void onResponse(StopDetectorResponse stopDetectorResponse) {
@Override
public void onFailure(Exception e) {
logger.error("Failed to delete AD model for detector " + detectorId, e);
channel.sendResponse(new BytesRestResponse(RestStatus.INTERNAL_SERVER_ERROR, "Failed to delete AD model"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this fix.
We will add AD job and the stop detector API will not be called when delete monitor. Have moved stop detector logic to stop AD job API in this PR: #44

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Will close this PR and comment on your PR.

}
};
}
Expand Down