Skip to content

Commit

Permalink
Merge pull request #74 from fiit-tp7-2023/download-documents-through-api
Browse files Browse the repository at this point in the history
Add document API logs
  • Loading branch information
brano-hozza authored Dec 11, 2023
2 parents ec3970b + 04eebfc commit a272ea0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/api/document/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export default defineEventHandler(async (event) => {
});

const { getDocument } = useDocumentService();
return await getDocument(query).catch(() => {
return await getDocument(query).catch((e) => {
console.error('Download document error:', String(e));

throw createError({
statusCode: 404,
statusMessage: 'Not Found',
Expand Down

0 comments on commit a272ea0

Please sign in to comment.