calcom/cal.diy · warning · HttpError
No credential found for user
Error message
No credential found for user
What it means
Thrown by the Basecamp 3 projects listing handler when the authenticated user has no Basecamp 3 credential row. Without the OAuth token the handler cannot list projects. Surfaced as HTTP 403. Same precondition as the projectMutation endpoint.
Source
Thrown at packages/app-store/basecamp3/api/projects.ts:26
import prisma from "@calcom/prisma";
import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/credential";
import { HttpError } from "@calcom/lib/http-error";
async function handler(req: NextApiRequest) {
const userId = req.session?.user?.id;
if (!userId) {
throw new HttpError({ statusCode: 401, message: "Unauthorized" });
}
const { user_agent } = await getAppKeysFromSlug("basecamp3");
const credential = await prisma.credential.findFirst({
where: { userId },
select: credentialForCalendarServiceSelect,
});
if (!credential) {
throw new HttpError({ statusCode: 403, message: "No credential found for user" });
}
let credentialKey = credential.key as BasecampToken;
if (!credentialKey.account) {
return { currentProject: null, projects: [] };
}
if (credentialKey.expires_at < Date.now()) {
credentialKey = (await refreshAccessToken(credential)) as BasecampToken;
}
const url = `${credentialKey.account.href}/projects.json`;
const resp = await fetch(url, {
headers: { "User-Agent": user_agent as string, Authorization: `Bearer ${credentialKey.access_token}` },
});
if (!resp.ok) {View on GitHub (pinned to 176037d0af)
Solutions
- Complete the Basecamp 3 OAuth connect flow first.
- Verify a credential row exists for the user before rendering the projects UI.
- Re-install the Basecamp 3 app if it was removed.
Defensive patterns
Strategy: validation
Validate before calling
const credential = await prisma.credential.findFirst({
where: { userId },
select: credentialForCalendarServiceSelect,
});
if (!credential) {
// prompt the user to connect Basecamp before listing projects
} Prevention
- Complete Basecamp 3 OAuth connect before listing projects.
- Gate the projects UI on the presence of a credential row.
- Re-install Basecamp 3 if it was removed.
When it happens
Trigger: User navigates to the Basecamp settings before completing OAuth connect; the credential was deleted; a different user account without a Basecamp connection.
Common situations: User skipped the connect step; uninstall cleared the credential; multiple accounts where the active one lacks the credential.
Related errors
- No credential found for user
- Credentials not found
- Failed to fetch project details
- Error refreshing dub token: ${res?.error?.message ?? respons
- Feishu Calendar refresh token expired
AI-assisted analysis of calcom/cal.diy@176037d0af (2026-08-12).
Data as JSON: /api/errors/a3bac724d4a12b0c.
Report an issue: GitHub.