[WIKI-565] chore: handle 404 messages in live server (#7472)
* chore: handle 404 messages in live server * chore: removed error stack from response
This commit is contained in:
parent
2746bad86b
commit
849b7b7bf3
2 changed files with 6 additions and 3 deletions
|
|
@ -1,3 +1,4 @@
|
|||
PORT=3100
|
||||
API_BASE_URL="http://localhost:8000"
|
||||
|
||||
WEB_BASE_URL="http://localhost:3000"
|
||||
|
|
|
|||
|
|
@ -82,14 +82,16 @@ export class Server {
|
|||
});
|
||||
} catch (error) {
|
||||
manualLogger.error("Error in /convert-document endpoint:", error);
|
||||
res.status(500).send({
|
||||
message: `Internal server error. ${error}`,
|
||||
res.status(500).json({
|
||||
message: `Internal server error.`,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
this.app.use((_req: Request, res: Response) => {
|
||||
res.status(404).send("Not Found");
|
||||
res.status(404).json({
|
||||
message: "Not Found",
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue