Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ private Table parseUploadedFile(CompletedFileUpload file) throws UnsupportedType
//TODO: Allow them to pass in header row index in the future
df = FileUtil.parseTableFromExcel(file.getInputStream(), 0);
} catch (IOException | ParsingException e) {
throw new HttpStatusException(HttpStatus.BAD_REQUEST, String.format("Error(s) detected in file, %s. %s. Import cannot proceed.", file.getFilename(), e.getMessage()));
throw new HttpStatusException(HttpStatus.BAD_REQUEST, e.getMessage());
}
} else {
throw new UnsupportedTypeException("Unsupported mime type");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public ProgramUpload updateTraitUpload(UUID programId, CompletedFileUpload file,
traits = parser.parseExcel(new BOMInputStream(file.getInputStream(), false));
} catch(IOException | ParsingException e) {
log.error(e.getMessage());
throw new HttpStatusException( HttpStatus.BAD_REQUEST, String.format("Error(s) detected in file, %s. %s. Import cannot proceed.", file.getFilename(), e.getMessage()) );
throw new HttpStatusException( HttpStatus.BAD_REQUEST, e.getMessage() );
}
} else {
throw new UnsupportedTypeException("Unsupported mime type");
Expand Down