Skip to content

Commit

Permalink
API / Batch editing / On preview mode, return exception
Browse files Browse the repository at this point in the history
When using preview mode, no report or exception are returned and it is hard to track what is wrong with XPath or XML snippet.

Report exception directly.
  • Loading branch information
fxprunayre authored Feb 22, 2024
1 parent c3011e8 commit 54f4228
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@ private Pair<SimpleMetadataProcessingReport, Element> applyBatchEdits(
}
} catch (Exception e) {
report.addMetadataError(record, e);
if (previewOnly) {
throw e;
}
}
report.incrementProcessedRecords();
}
Expand Down

0 comments on commit 54f4228

Please sign in to comment.