Skip to content

Commit 1ef2dda

Browse files
committed
OY-4784 Slightly improve error reporting. Still a bit iffy.
1 parent 17b66a0 commit 1ef2dda

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/scala/fi/vm/sade/hakurekisteri/integration/ytl/YtlFetchActor.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,6 @@ class YtlFetchActor(
338338
}
339339

340340
Future.sequence(futures.toSeq).onComplete { _ =>
341-
log.info(s"($tunniste) Futures complete! Haku $hakuOid")
342341
log
343342
.info(
344343
s"($tunniste) Completed YTL syncAll for haku $hakuOid with hasErrors=${hasErrors.get()}"
@@ -347,7 +346,11 @@ class YtlFetchActor(
347346
}
348347
result.map(r => {
349348
log.info(s"($tunniste) $r Future finished, returning none")
350-
None
349+
if (hasErrors.get()) {
350+
Some(new Throwable(s"($tunniste) sync for haku $hakuOid had errors"))
351+
} else {
352+
None
353+
}
351354
})
352355
}
353356
})

0 commit comments

Comments
 (0)