fix: improve error logging
Cloudflare doesn't log causes, only the messages so splitting the logs in to 2
This commit is contained in:
@@ -105,7 +105,7 @@ app.openapi(route, async (c) => {
|
||||
watchStatus,
|
||||
);
|
||||
} catch (error) {
|
||||
console.error(new Error("Error setting watch status", { cause: error }));
|
||||
console.error("Error setting watch status");
|
||||
console.error(error);
|
||||
return c.json(ErrorResponse, { status: 500 });
|
||||
}
|
||||
@@ -118,9 +118,8 @@ app.openapi(route, async (c) => {
|
||||
aniListToken,
|
||||
);
|
||||
} catch (error) {
|
||||
console.error(
|
||||
new Error("Failed to update watch status on Anilist", { cause: error }),
|
||||
);
|
||||
console.error("Failed to update watch status on Anilist");
|
||||
console.error(error);
|
||||
if (isRetrying) {
|
||||
return c.json(ErrorResponse, { status: 500 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user