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

Conversation

kaituo
Copy link
Member

@kaituo kaituo commented Feb 20, 2020

Previously, a stop detector api request hangs until timeout if there is a failure.

Testing done:

  • verified the issue is fixed

Previously, a stop detector api request hangs until timeout if there is a failure.

Testing done:
* verified the issue is fixed
@kaituo kaituo requested review from ylwu-amzn and wnbts February 20, 2020 07:25
@@ -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.

@kaituo kaituo closed this Feb 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants