{"record":{"id":"bee2e37c3a12cfdd","repo":"n8n-io/n8n","slug":"attempted-to-create-a-new-project-but-quota-is-alr","errorCode":null,"errorMessage":"Attempted to create a new project but quota is already exhausted. You may have a maximum of ${limit} team projects.","messagePattern":"Attempted to create a new project but quota is already exhausted\\. You may have a maximum of (.+?) team projects\\.","errorType":"exception","errorClass":"BadRequestError","httpStatus":400,"severity":"error","filePath":"packages/cli/src/controllers/project.controller.ts","lineNumber":128,"sourceCode":"\n\t\t\tconst relation = await this.projectsService.getProjectRelationForUserAndProject(\n\t\t\t\treq.user.id,\n\t\t\t\tproject.id,\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\t...project,\n\t\t\t\trole: 'project:admin',\n\t\t\t\tscopes: [\n\t\t\t\t\t...combineScopes({\n\t\t\t\t\t\tglobal: getAuthPrincipalScopes(req.user),\n\t\t\t\t\t\tproject: relation?.role.scopes.map((scope) => scope.slug) ?? [],\n\t\t\t\t\t}),\n\t\t\t\t],\n\t\t\t};\n\t\t} catch (e) {\n\t\t\tif (e instanceof TeamProjectOverQuotaError) {\n\t\t\t\tthrow new BadRequestError(e.message);\n\t\t\t}\n\t\t\tthrow e;\n\t\t}\n\t}\n\n\t@Get('/my-projects')\n\tasync getMyProjects(\n\t\treq: AuthenticatedRequest,\n\t\t_res: Response,\n\t): Promise<ProjectRequest.GetMyProjectsResponse> {\n\t\tconst relations = await this.projectsService.getProjectRelationsForUser(req.user);\n\t\tconst otherTeamProject = hasGlobalScope(req.user, 'project:read')\n\t\t\t? await this.projectRepository.findBy({\n\t\t\t\t\ttype: 'team',\n\t\t\t\t\tid: Not(In(relations.map((pr) => pr.projectId))),\n\t\t\t\t})\n\t\t\t: [];\n","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/cli/src/controllers/project.controller.ts#L110-L146","documentation":"Creating a team project would exceed the licensed team-project quota. projectsService throws TeamProjectOverQuotaError, constructed with the limit, and the controller catches it and rethrows as a 400 BadRequestError with the quota message embedded.","triggerScenarios":"POST to create a new project once the number of existing team projects is already at the licensed maximum (TeamProjectOverQuotaError(limit)).","commonSituations":"Plan caps the number of team projects; many stale/abandoned team projects are consuming the quota; license tier lower than the org's usage.","solutions":["Delete or archive unused team projects to free quota, then retry.","Upgrade the license tier to allow more team projects.","Audit the current project count vs. the license limit reported in the message before creating new ones."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Check current team-project count vs licensed max before creating.\nasync function canCreateTeamProject(listProjects, licensedMax) {\n  const count = (await listProjects()).filter((p) => p.type === 'team').length;\n  return count < licensedMax;\n}","typeGuard":null,"tryCatchPattern":"try {\n  await api.post('/projects', payload);\n} catch (e) {\n  if (e.status === 400 && /quota is already exhausted/.test(e.message)) {\n    // free quota (delete unused projects) or upgrade license, then retry\n  } else { throw e; }\n}","preventionTips":["Track team-project count against the license limit.","Archive/delete abandoned projects to maintain headroom."],"tags":["license","quota","projects"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}