Function
onGetError
(error: any, req: any, res: any, _: any)
Source from the content-addressed store, hash-verified
| 24 | } |
| 25 | |
| 26 | export function onGetError(error: any, req: any, res: any, _: any) { |
| 27 | const path = !!req.baseUrl ? req.baseUrl : req.url; |
| 28 | console.error( |
| 29 | `[${req.method}] ${path} >> StatusCode:: 500, Message:: ${error.message}` |
| 30 | ); |
| 31 | return res.redirect('/500'); |
| 32 | } |
| 33 | |
| 34 | export function onNoMatch(req: any, res: any) { |
| 35 | res.status(404).json({ message: 'Not Found' }); |
Callers
nothing calls this directly
Tested by
no test coverage detected