RED-6934: Fixed too long error message for cause field in db #12
@ -166,14 +166,20 @@ public class FileStatusPersistenceService {
|
||||
|
||||
@Transactional
|
||||
public void updateStatusErrorInfo(String fileId, FileErrorInfo fileErrorInfo) {
|
||||
|
||||
if (fileErrorInfo == null) {
|
||||
fileRepository.updateStatusErrorInfo(fileId, null, null, null, null);
|
||||
} else {
|
||||
fileRepository.updateStatusErrorInfo(fileId, fileErrorInfo.getCause(), fileErrorInfo.getQueue(), fileErrorInfo.getService(), fileErrorInfo.getTimestamp());
|
||||
fileRepository.updateStatusErrorInfo(fileId,
|
||||
fileErrorInfo.getCause().substring(0, Math.min(fileErrorInfo.getCause().length(), 255)),
|
||||
fileErrorInfo.getQueue(),
|
||||
fileErrorInfo.getService(),
|
||||
fileErrorInfo.getTimestamp());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Transactional
|
||||
public void updateProcessingStatus(String fileId, ProcessingStatus processingStatus) {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user