Skip to content

Commit 1084674

Browse files
committed
Remove logs
1 parent 4ef61b0 commit 1084674

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

server/src/controllers/v1/helpers.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,24 @@ export const TMakeApiResponse = <T extends TSchema>(type: T) => {
1919
export const handleError = new Elysia({ name: "api-error-handler" })
2020
.error("INLINE_ERROR", InlineError)
2121
.onError({ as: "scoped" }, ({ code, error }) => {
22-
console.log("Error in handleError", code, error, typeof error, error.name)
23-
if (code === "NOT_FOUND")
22+
if (code === "NOT_FOUND") {
23+
Log.shared.error("API ERROR NOT FOUND", error)
2424
return {
2525
ok: false,
2626
error: "NOT_FOUND",
2727
errorCode: 404,
2828
description: "Method not found",
2929
}
30-
if (error instanceof InlineError) {
31-
console.log("Error in handleError instance of InlineError", error.type, error.code)
30+
} else if (error instanceof InlineError) {
31+
Log.shared.error("API ERROR", error)
3232
return {
3333
ok: false,
3434
error: error.type,
3535
errorCode: error.code,
3636
description: error.description,
3737
}
3838
} else if (code === "VALIDATION") {
39-
console.error("VALIDATION ERROR", error)
39+
Log.shared.error("VALIDATION ERROR", error)
4040
return {
4141
ok: false,
4242
error: "INVALID_ARGS",

0 commit comments

Comments
 (0)