Skip to content

Commit 1b43755

Browse files
committed
ALEC-296: driverInit returns error Response on InterruptedException
Addresses Copilot review feedback on PR #154. Without this, reEvaluateAllOpenAlarms() (and the existing engine-config save paths) could report HTTP 200 even when the driver init was interrupted before the engine came back up — masking failures from the caller. (The companion test fix for the missing re-evaluate confirm-cancel no-op test was already pushed by Copilot Autofix as 19bc094.)
1 parent 19bc094 commit 1b43755

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

features/ui/src/main/java/org/opennms/alec/rest/EngineRestImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,9 @@ private Response driverInit(Driver driver) {
203203
try {
204204
future.get();
205205
} catch (InterruptedException e) {
206-
LOG.error("Engine creation failed", e.getCause());
206+
LOG.error("Engine creation interrupted", e);
207207
Thread.currentThread().interrupt();
208+
return ALECRestUtils.somethingWentWrong(e);
208209
} catch (ExecutionException e) {
209210
LOG.error("Engine creation failed", e.getCause());
210211
return ALECRestUtils.somethingWentWrong(e);

0 commit comments

Comments
 (0)