From ee48d2b7c0f57a4896a610e7d3fd073121b9d51a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ko=C5=82odziejczak?= <31549762+mrl5@users.noreply.github.com> Date: Tue, 10 Dec 2024 09:14:21 +0100 Subject: [PATCH] chore: update known errors to correct URL (#356) Co-authored-by: Konstantin Wohlwend --- README.md | 2 +- apps/e2e/tests/backend/endpoints/api/v1/index.test.ts | 2 +- .../endpoints/api/v1/integrations/neon/api-keys.test.ts | 2 +- .../tests/backend/endpoints/api/v1/internal/api-keys.test.ts | 2 +- .../tests/backend/endpoints/api/v1/internal/projects.test.ts | 2 +- apps/e2e/tests/backend/endpoints/api/v1/projects.test.ts | 2 +- apps/e2e/tests/backend/endpoints/api/v1/users.test.ts | 4 ++-- packages/stack-shared/src/known-errors.tsx | 4 ++-- packages/stack/README.md | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 583268747..64ea6c5c6 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Stack Auth is a managed user authentication solution. It is developer-friendly a Stack gets you started in just five minutes, after which you'll be ready to use all of its features as you grow your project. Our managed service is completely optional and you can export your user data and self-host, for free, at any time. -We support Next.js frontends, along with any backend that can use our [REST API](https://docs.stack-auth.com/rest-api/auth). Check out our [setup guide](https://docs.stack-auth.com/getting-started/setup) to get started. +We support Next.js frontends, along with any backend that can use our [REST API](https://docs.stack-auth.com/rest-api/overview). Check out our [setup guide](https://docs.stack-auth.com/getting-started/setup) to get started.
Stack Setup diff --git a/apps/e2e/tests/backend/endpoints/api/v1/index.test.ts b/apps/e2e/tests/backend/endpoints/api/v1/index.test.ts index 218939715..06d508248 100644 --- a/apps/e2e/tests/backend/endpoints/api/v1/index.test.ts +++ b/apps/e2e/tests/backend/endpoints/api/v1/index.test.ts @@ -47,7 +47,7 @@ describe("without project ID", () => { "body": { "code": "ACCESS_TYPE_WITHOUT_PROJECT_ID", "details": { "request_type": "client" }, - "error": "The x-stack-access-type header was 'client', but the x-stack-project-id header was not provided.\\n\\nFor more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/auth#authentication", + "error": "The x-stack-access-type header was 'client', but the x-stack-project-id header was not provided.\\n\\nFor more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/overview#authentication", }, "headers": Headers { "x-stack-known-error": "ACCESS_TYPE_WITHOUT_PROJECT_ID", diff --git a/apps/e2e/tests/backend/endpoints/api/v1/integrations/neon/api-keys.test.ts b/apps/e2e/tests/backend/endpoints/api/v1/integrations/neon/api-keys.test.ts index cb0b4568c..3627f86c1 100644 --- a/apps/e2e/tests/backend/endpoints/api/v1/integrations/neon/api-keys.test.ts +++ b/apps/e2e/tests/backend/endpoints/api/v1/integrations/neon/api-keys.test.ts @@ -16,7 +16,7 @@ describe("without project access", () => { "body": { "code": "ACCESS_TYPE_WITHOUT_PROJECT_ID", "details": { "request_type": "client" }, - "error": "The x-stack-access-type header was 'client', but the x-stack-project-id header was not provided.\\n\\nFor more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/auth#authentication", + "error": "The x-stack-access-type header was 'client', but the x-stack-project-id header was not provided.\\n\\nFor more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/overview#authentication", }, "headers": Headers { "x-stack-known-error": "ACCESS_TYPE_WITHOUT_PROJECT_ID", diff --git a/apps/e2e/tests/backend/endpoints/api/v1/internal/api-keys.test.ts b/apps/e2e/tests/backend/endpoints/api/v1/internal/api-keys.test.ts index 0aeb600b3..34082d6ac 100644 --- a/apps/e2e/tests/backend/endpoints/api/v1/internal/api-keys.test.ts +++ b/apps/e2e/tests/backend/endpoints/api/v1/internal/api-keys.test.ts @@ -16,7 +16,7 @@ describe("without project access", () => { "body": { "code": "ACCESS_TYPE_WITHOUT_PROJECT_ID", "details": { "request_type": "client" }, - "error": "The x-stack-access-type header was 'client', but the x-stack-project-id header was not provided.\\n\\nFor more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/auth#authentication", + "error": "The x-stack-access-type header was 'client', but the x-stack-project-id header was not provided.\\n\\nFor more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/overview#authentication", }, "headers": Headers { "x-stack-known-error": "ACCESS_TYPE_WITHOUT_PROJECT_ID", diff --git a/apps/e2e/tests/backend/endpoints/api/v1/internal/projects.test.ts b/apps/e2e/tests/backend/endpoints/api/v1/internal/projects.test.ts index 21200002f..aecc48ccb 100644 --- a/apps/e2e/tests/backend/endpoints/api/v1/internal/projects.test.ts +++ b/apps/e2e/tests/backend/endpoints/api/v1/internal/projects.test.ts @@ -11,7 +11,7 @@ it("should not have have access to the project", async ({ expect }) => { "body": { "code": "ACCESS_TYPE_WITHOUT_PROJECT_ID", "details": { "request_type": "client" }, - "error": "The x-stack-access-type header was 'client', but the x-stack-project-id header was not provided.\\n\\nFor more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/auth#authentication", + "error": "The x-stack-access-type header was 'client', but the x-stack-project-id header was not provided.\\n\\nFor more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/overview#authentication", }, "headers": Headers { "x-stack-known-error": "ACCESS_TYPE_WITHOUT_PROJECT_ID", diff --git a/apps/e2e/tests/backend/endpoints/api/v1/projects.test.ts b/apps/e2e/tests/backend/endpoints/api/v1/projects.test.ts index 32203f85a..16d7703b5 100644 --- a/apps/e2e/tests/backend/endpoints/api/v1/projects.test.ts +++ b/apps/e2e/tests/backend/endpoints/api/v1/projects.test.ts @@ -14,7 +14,7 @@ it("should not have have access to the project without project keys", async ({ e "body": { "code": "ACCESS_TYPE_WITHOUT_PROJECT_ID", "details": { "request_type": "client" }, - "error": "The x-stack-access-type header was 'client', but the x-stack-project-id header was not provided.\\n\\nFor more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/auth#authentication", + "error": "The x-stack-access-type header was 'client', but the x-stack-project-id header was not provided.\\n\\nFor more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/overview#authentication", }, "headers": Headers { "x-stack-known-error": "ACCESS_TYPE_WITHOUT_PROJECT_ID", diff --git a/apps/e2e/tests/backend/endpoints/api/v1/users.test.ts b/apps/e2e/tests/backend/endpoints/api/v1/users.test.ts index 686d550b4..70ba833e5 100644 --- a/apps/e2e/tests/backend/endpoints/api/v1/users.test.ts +++ b/apps/e2e/tests/backend/endpoints/api/v1/users.test.ts @@ -20,7 +20,7 @@ describe("without project access", () => { "status": 400, "body": { "code": "ACCESS_TYPE_REQUIRED", - "error": "You must specify an access level for this Stack project. Make sure project API keys are provided (eg. x-stack-publishable-client-key) and you set the x-stack-access-type header to 'client', 'server', or 'admin'.\\n\\nFor more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/auth#authentication", + "error": "You must specify an access level for this Stack project. Make sure project API keys are provided (eg. x-stack-publishable-client-key) and you set the x-stack-access-type header to 'client', 'server', or 'admin'.\\n\\nFor more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/overview#authentication", }, "headers": Headers { "x-stack-known-error": "ACCESS_TYPE_REQUIRED", @@ -37,7 +37,7 @@ describe("without project access", () => { "status": 400, "body": { "code": "ACCESS_TYPE_REQUIRED", - "error": "You must specify an access level for this Stack project. Make sure project API keys are provided (eg. x-stack-publishable-client-key) and you set the x-stack-access-type header to 'client', 'server', or 'admin'.\\n\\nFor more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/auth#authentication", + "error": "You must specify an access level for this Stack project. Make sure project API keys are provided (eg. x-stack-publishable-client-key) and you set the x-stack-access-type header to 'client', 'server', or 'admin'.\\n\\nFor more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/overview#authentication", }, "headers": Headers { "x-stack-known-error": "ACCESS_TYPE_REQUIRED", diff --git a/packages/stack-shared/src/known-errors.tsx b/packages/stack-shared/src/known-errors.tsx index c900d0ad6..8e447cf71 100644 --- a/packages/stack-shared/src/known-errors.tsx +++ b/packages/stack-shared/src/known-errors.tsx @@ -288,7 +288,7 @@ const AccessTypeWithoutProjectId = createKnownErrorConstructor( deindent` The x-stack-access-type header was '${accessType}', but the x-stack-project-id header was not provided. - For more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/auth#authentication + For more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/overview#authentication `, { request_type: accessType, @@ -305,7 +305,7 @@ const AccessTypeRequired = createKnownErrorConstructor( deindent` You must specify an access level for this Stack project. Make sure project API keys are provided (eg. x-stack-publishable-client-key) and you set the x-stack-access-type header to 'client', 'server', or 'admin'. - For more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/auth#authentication + For more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/overview#authentication `, ] as const, () => [] as const, diff --git a/packages/stack/README.md b/packages/stack/README.md index 65b100c5a..a10051145 100644 --- a/packages/stack/README.md +++ b/packages/stack/README.md @@ -6,7 +6,7 @@ Stack Auth is a managed user authentication solution. It is developer-friendly a Stack gets you started in just five minutes, after which you'll be ready to use all of its features as you grow your project. Our managed service is completely optional and you can export your user data and self-host, for free, at any time. -We support Next.js frontends, along with any backend that can use our [REST API](https://docs.stack-auth.com/rest-api/auth). Check out our [setup guide](https://docs.stack-auth.com/getting-started/setup) to get started. +We support Next.js frontends, along with any backend that can use our [REST API](https://docs.stack-auth.com/rest-api/overview). Check out our [setup guide](https://docs.stack-auth.com/getting-started/setup) to get started. ## 📦 Installation & Setup