Skip to content

Commit cfb144c

Browse files
committed
Log errors when operandi workflow fails
1 parent cc1e76a commit cfb144c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/java/de/ocrd/olahd/operandi/OperandiJobStarter.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package de.ocrd.olahd.operandi;
22

33
import static de.ocrd.olahd.utils.Utils.logDebug;
4+
import static de.ocrd.olahd.utils.Utils.logError;
45

56
import de.ocrd.olahd.domain.Archive;
67
import de.ocrd.olahd.domain.OperandiJobInfo;
@@ -89,7 +90,9 @@ public void run() {
8990
jobinfo.setWorkspaceId(workspaceId);
9091
jobinfo = operandiJobRepository.save(jobinfo);
9192
} catch (Exception e) {
92-
this.handleError("Error while uploading workspace to operandi", workspaceId);
93+
var msg = "Error while uploading workspace to operandi";
94+
logError(msg, e);
95+
this.handleError(msg, workspaceId);
9396
return;
9497
}
9598

@@ -102,7 +105,9 @@ public void run() {
102105
jobinfo = operandiJobRepository.save(jobinfo);
103106
logDebug("runOperandiWorkflow - Saved Operandi job in mongodb: %s", jobinfo.getId());
104107
} catch(Exception e) {
105-
this.handleError("Error starting operandi workflow", workspaceId);
108+
var msg = "Error starting operandi workflow";
109+
logError(msg, e);
110+
this.handleError(msg, workspaceId);
106111
return;
107112
}
108113
}

0 commit comments

Comments
 (0)