debug: add error logging to getClientWithProjectsByToken
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user