-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Current code loses the original error message but outputs the stacktrace:
} catch (Exception e) {
Supplier<String> errorMessage =
() ->
format(
"Exception creating Source record for: Key=%s Value=%s",
keyDocument.toJson(), valueDocument.toJson());
if (sourceConfig.logErrors()) {
LOGGER.error(errorMessage.get(), e);
}
Update the errorMessage supplier to include the original exception message at the start of the message.