Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
log.warn() if the target Alert is not in an acknowledgeable state.
  • Loading branch information
Ryan Morgan committed Oct 1, 2009
1 parent e1b50d3 commit 1adc234
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions hqu/hqapi1/app/AlertController.groovy
Expand Up @@ -206,8 +206,13 @@ public class AlertController extends ApiController {
try {
// TODO: Add to EscalationHelper
for (id in ids) {
escMan.acknowledgeAlert(user, ClassicEscalationAlertType.CLASSIC,
id, reason, pause)
def success = escMan.acknowledgeAlert(user, ClassicEscalationAlertType.CLASSIC,
id, reason, pause)
if (!success) {
// TODO: Should re-evaluate this in the future, should we return an error?
log.warn("Alert id " + id + " was not in an " +
"acknowledgable state")
}
}
} catch (Throwable t) {
failureXml = getFailureXML(ErrorCode.UNEXPECTED_ERROR,
Expand Down

0 comments on commit 1adc234

Please sign in to comment.