Skip to content

Commit dd5fdfa

Browse files
committed
fix: logging flags
1 parent 6f6b614 commit dd5fdfa

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

packages/rpc/src/utils/auth.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@ const getWebsiteById = cacheable(
1717
where: eq(websites.id, id),
1818
});
1919
} catch (error) {
20-
logger.error("Error fetching website by ID", {
21-
error: error instanceof Error ? error.message : String(error),
22-
id,
23-
});
20+
logger.error(
21+
{
22+
error,
23+
id,
24+
},
25+
"Error fetching website by ID"
26+
);
2427
return null;
2528
}
2629
},
@@ -41,10 +44,13 @@ const getDbConnectionById = async (id: string) => {
4144
where: eq(dbConnections.id, id),
4245
});
4346
} catch (error) {
44-
logger.error("Error fetching database connection by ID", {
45-
error: error instanceof Error ? error.message : String(error),
46-
id,
47-
});
47+
logger.error(
48+
{
49+
error,
50+
id,
51+
},
52+
"Error fetching database connection by ID"
53+
);
4854
return null;
4955
}
5056
};

0 commit comments

Comments
 (0)