This commit is contained in:
@@ -187,13 +187,10 @@ public class ApiController {
|
||||
.body(fileBytes);
|
||||
|
||||
} catch (FileNotFoundException e) {
|
||||
log.warn("File not found in DB: {}", fileId);
|
||||
return ResponseEntity.notFound().build();
|
||||
} catch (NoSuchKeyException e) {
|
||||
log.warn("File not found in S3: {}", fileId);
|
||||
return ResponseEntity.status(HttpStatus.NOT_FOUND).build();
|
||||
} catch (Exception e) {
|
||||
log.error("Error reading file: {}", fileId, e);
|
||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user