fix: better 404 message
This commit is contained in:
parent
3602f12113
commit
280ccf5701
|
|
@ -50,7 +50,11 @@ const app = new Elysia({
|
|||
.use(listConverters)
|
||||
.use(chooseConverter)
|
||||
.use(healthcheck)
|
||||
.onError(({ error }) => {
|
||||
.onError(({ error, code, request }) => {
|
||||
if (code === "NOT_FOUND") {
|
||||
console.warn(`404: ${request.method} ${new URL(request.url).pathname}`);
|
||||
return;
|
||||
}
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue