n8n-io/n8n · error · BadRequestError

Attempted to create a new project but quota is already exhau

Error message

Attempted to create a new project but quota is already exhausted. You may have a maximum of ${limit} team projects.

What it means

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.

Source

Thrown at packages/cli/src/controllers/project.controller.ts:128

			const relation = await this.projectsService.getProjectRelationForUserAndProject(
				req.user.id,
				project.id,
			);

			return {
				...project,
				role: 'project:admin',
				scopes: [
					...combineScopes({
						global: getAuthPrincipalScopes(req.user),
						project: relation?.role.scopes.map((scope) => scope.slug) ?? [],
					}),
				],
			};
		} catch (e) {
			if (e instanceof TeamProjectOverQuotaError) {
				throw new BadRequestError(e.message);
			}
			throw e;
		}
	}

	@Get('/my-projects')
	async getMyProjects(
		req: AuthenticatedRequest,
		_res: Response,
	): Promise<ProjectRequest.GetMyProjectsResponse> {
		const relations = await this.projectsService.getProjectRelationsForUser(req.user);
		const otherTeamProject = hasGlobalScope(req.user, 'project:read')
			? await this.projectRepository.findBy({
					type: 'team',
					id: Not(In(relations.map((pr) => pr.projectId))),
				})
			: [];

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Delete or archive unused team projects to free quota, then retry.
  2. Upgrade the license tier to allow more team projects.
  3. Audit the current project count vs. the license limit reported in the message before creating new ones.
Defensive patterns

Strategy: validation

Validate before calling

// Check current team-project count vs licensed max before creating.
async function canCreateTeamProject(listProjects, licensedMax) {
  const count = (await listProjects()).filter((p) => p.type === 'team').length;
  return count < licensedMax;
}

Try / catch

try {
  await api.post('/projects', payload);
} catch (e) {
  if (e.status === 400 && /quota is already exhausted/.test(e.message)) {
    // free quota (delete unused projects) or upgrade license, then retry
  } else { throw e; }
}

Prevention

When it happens

Trigger: POST to create a new project once the number of existing team projects is already at the licensed maximum (TeamProjectOverQuotaError(limit)).

Common situations: Plan caps the number of team projects; many stale/abandoned team projects are consuming the quota; license tier lower than the org's usage.

Related errors


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/bee2e37c3a12cfdd. Report an issue: GitHub.