fix: improve error logging
Cloudflare doesn't log causes, only the messages so splitting the logs in to 2
This commit is contained in:
@@ -107,7 +107,7 @@ app.openapi(route, async (c) => {
|
||||
return c.json(ErrorResponse, { status: 401 });
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(new Error("Failed to authenticate with AniList"));
|
||||
console.error("Failed to authenticate with AniList");
|
||||
console.error(error);
|
||||
return c.json(ErrorResponse, { status: 500 });
|
||||
}
|
||||
@@ -119,7 +119,7 @@ app.openapi(route, async (c) => {
|
||||
user.name!,
|
||||
);
|
||||
} catch (error) {
|
||||
console.error(new Error("Failed to associate device"));
|
||||
console.error("Failed to associate device");
|
||||
console.error(error);
|
||||
return c.json(ErrorResponse, { status: 500 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user