We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a08a5e commit 80c8fabCopy full SHA for 80c8fab
server/app/src/apis/module/error.ts
@@ -16,18 +16,14 @@ function errorResposne(
16
res: Response
17
) {
18
if (err instanceof ServerError) {
19
- console.error(err);
20
return res.status(500).json({ statusCode: err.code, msg: err.message });
21
}
22
if (err instanceof BadRequestError) {
23
24
return res.status(400).json({ statusCode: err.code, msg: err.message });
25
26
if (err instanceof NotFoundError) {
27
28
return res.status(404).json({ statusCode: err.code, msg: err.message });
29
30
31
return res.status(500).json({ statusCode: 500, msg: 'Unknown error' });
32
33
0 commit comments