fix: improve error logging
Cloudflare doesn't log causes, only the messages so splitting the logs in to 2
This commit is contained in:
@@ -78,7 +78,8 @@ app.openapi(route, async (c) => {
|
||||
|
||||
await saveToken(env(c, "workerd"), deviceId, token);
|
||||
} catch (error) {
|
||||
console.error(new Error("Failed to save token", { cause: error }));
|
||||
console.error("Failed to save token");
|
||||
console.error(error);
|
||||
return c.json(ErrorResponse, 500);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user