Skip to content

Commit

Permalink
fix: exception thrown by FileServiceImpl#handleDownloadRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
D-D-H committed Mar 20, 2024
1 parent 90253b6 commit 9c35f42
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ public NamedResource handleDownloadRequest(long fileId) throws Throwable {
FileEntity file = getFileEntityByIdAndCheckAuthority(fileId);
Resource resource = null;
if (isMaster()) {
// forward the request to the static worker
FileStaticWorkerBindEntity bind = fileStaticWorkerBindRepo.findByFileId(file.getId())
.orElseThrow(() -> CE(INTERNAL_ERROR));
.orElse(null);
if (bind != null) {
// forward the request to the static worker
resource = workerService.forwardDownloadRequestToStaticWorker(bind.getStaticWorker(), file.getId());
}
}
Expand Down

0 comments on commit 9c35f42

Please sign in to comment.