Skip to content

Commit

Permalink
Merge pull request #139 from jannis-baum/issue/136-markdown-render-er…
Browse files Browse the repository at this point in the history
…ror-causes-file-not-found

Markdown render error causes "file not found"
  • Loading branch information
jannis-baum authored Jul 28, 2024
2 parents 140ad19 + a1e1797 commit 0c0769d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ router.get(/.*/, async (req: Request, res: Response) => {

body = renderTextFile(data.toString(), path);
}
} catch {
res.status(404).send('File not found.');
} catch (error) {
res.status(500).send(String(error));
return;
}
}
Expand Down

0 comments on commit 0c0769d

Please sign in to comment.