debug: add error logging to getClientWithProjectsByToken

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-22 18:38:41 +02:00
parent a478462aa4
commit 7f9150b75a
+5
View File
@@ -133,6 +133,7 @@ export interface ClientProjectSummary {
export async function getClientWithProjectsByToken(
tokenOrSlug: string
): Promise<ClientProjectSummary | null> {
try {
// Try slug first
let clientRows = await db
.select({
@@ -173,6 +174,10 @@ export async function getClientWithProjectsByToken(
const activeProjects = projectRows.filter((p) => !p.archived);
return { client, projects: activeProjects };
} catch (err) {
console.error("[client-view] getClientWithProjectsByToken error:", err);
return null;
}
}
/**