diff --git a/apps/backend/src/route-handlers/smart-request.tsx b/apps/backend/src/route-handlers/smart-request.tsx index 231e3bee4..48bebde67 100644 --- a/apps/backend/src/route-handlers/smart-request.tsx +++ b/apps/backend/src/route-handlers/smart-request.tsx @@ -227,14 +227,14 @@ async function parseAuth(req: NextRequest): Promise { break; } default: { - throw new StackAssertionError(`Unexpected request type: ${requestType}. We should've filtered this earlier`); + throw new StackAssertionError(`Unexpected request type: ${requestType}. This should never happen because we should've filtered this earlier`); } } } const project = await getProject(projectId); if (!project) { - throw new StackAssertionError("Project not found; this should never happen because having a project ID should guarantee a project", { projectId }); + throw new StackAssertionError("Project not found; this should never happen because passing the checks until here should guarantee that the project exists and that access to it is granted", { projectId }); } let user = null;