Skip to content

Commit

Permalink
hotfix: re-introduced missing AppException throw, updated institution…
Browse files Browse the repository at this point in the history
…_not_found error with new http status code
  • Loading branch information
alessio-cialini committed Aug 8, 2024
1 parent 907b35d commit f9b29c8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ public ResponseEntity<Resource> generateNotice(@RequestParam(value = "folderId",
HttpHeaders headers = new HttpHeaders();
headers.add(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + file.getName() + "\"");
return ResponseEntity.ok().contentType(MediaType.APPLICATION_OCTET_STREAM).headers(headers).body(new ByteArrayResource(inputStream.readAllBytes()));
} catch (AppException e) {
throw e;
} catch (Exception e) {
throw new AppException(AppError.INTERNAL_SERVER_ERROR, e);
} finally {
Expand Down

0 comments on commit f9b29c8

Please sign in to comment.