diff --git a/e2e/helpers/auth.ts b/e2e/helpers/auth.ts
index 184f8bfd4..0c1ee2afe 100644
--- a/e2e/helpers/auth.ts
+++ b/e2e/helpers/auth.ts
@@ -33,7 +33,7 @@ export async function loginToApp(
// Use locators that match either outcome — Playwright auto-waits.
const appReady = page.getByTestId("left-navigation-item").first();
const setupModal = page.getByTestId("setup-netbird-modal");
- const approvalPending = page.getByText("User Approval Pending");
+ const approvalPending = page.getByTestId("pending-approval");
const onboarding = page.getByText("Add new device to your network");
const selectAccount = page.getByText("Select account");
const loginInput = page.locator("input[id=loginName]");
diff --git a/e2e/tests/login.spec.ts b/e2e/tests/login.spec.ts
index c081d208f..7d904300c 100644
--- a/e2e/tests/login.spec.ts
+++ b/e2e/tests/login.spec.ts
@@ -102,7 +102,7 @@ async function loginAndSave(
const skipButton = page.locator("button[name=skip]");
const appNav = page.getByTestId("left-navigation-item").first();
const modal = page.getByTestId("setup-netbird-modal");
- const approval = page.getByText("User Approval Pending");
+ const approval = page.getByTestId("pending-approval");
let after_login: "2fa" | "app" | "modal" | "approval";
try {
diff --git a/e2e/tests/team-users-approval-and-billing.spec.ts b/e2e/tests/team-users-approval-and-billing.spec.ts
index 89628585f..88b054bee 100644
--- a/e2e/tests/team-users-approval-and-billing.spec.ts
+++ b/e2e/tests/team-users-approval-and-billing.spec.ts
@@ -20,7 +20,7 @@ test.describe.serial("User Approval & Billing Admin @team", () => {
});
const page = await context.newPage();
await loginToApp(page, "user");
- await expect(page.getByText("User Approval Pending")).toBeVisible();
+ await expect(page.getByTestId("pending-approval")).toBeVisible();
await context.close();
});
diff --git a/src/app/error/page.tsx b/src/app/error/page.tsx
index 72a6a3f2c..3b8637dd8 100644
--- a/src/app/error/page.tsx
+++ b/src/app/error/page.tsx
@@ -8,6 +8,7 @@ import { ArrowRightIcon, RefreshCw } from "lucide-react";
import { useRouter, useSearchParams } from "next/navigation";
import { useEffect, useState } from "react";
import NetBirdIcon from "@/assets/icons/NetBirdIcon";
+import { PendingApproval } from "@/modules/users/PendingApproval";
const config = loadConfig();
@@ -57,9 +58,20 @@ export default function ErrorPage() {
error?.code === 403 &&
error?.message?.toLowerCase().includes("pending approval");
+ // Waiting for an approval is an expected part of signing up, so it gets a
+ // welcoming screen of its own instead of the error treatment.
+ if (isPendingApproval) {
+ return (
+