From 23ee33514d2288e34402793b6672f4085610e218 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 13 May 2025 16:02:27 +0000 Subject: [PATCH 1/3] chore(versions): bump api to v0.1.7; bump web to v0.1.7; bump cli to v0.1.7 [skip ci] --- api/server/Cargo.toml | 2 +- cli/cli/Cargo.toml | 2 +- web/package-lock.json | 4 ++-- web/package.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/server/Cargo.toml b/api/server/Cargo.toml index e67e0358d..7531ab1a9 100644 --- a/api/server/Cargo.toml +++ b/api/server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "buster_server" -version = "0.1.6" +version = "0.1.7" edition = "2021" default-run = "buster_server" diff --git a/cli/cli/Cargo.toml b/cli/cli/Cargo.toml index 5bbf41650..e984f673e 100644 --- a/cli/cli/Cargo.toml +++ b/cli/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "buster-cli" -version = "0.1.6" +version = "0.1.7" edition = "2021" build = "build.rs" diff --git a/web/package-lock.json b/web/package-lock.json index 9f0319651..c1a1dc95d 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1,12 +1,12 @@ { "name": "web", - "version": "0.1.6", + "version": "0.1.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "web", - "version": "0.1.6", + "version": "0.1.7", "dependencies": { "@dnd-kit/core": "^6.3.1", "@dnd-kit/modifiers": "^9.0.0", diff --git a/web/package.json b/web/package.json index e60841750..80d127ff2 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "web", - "version": "0.1.6", + "version": "0.1.7", "private": true, "scripts": { "dev": "next dev --turbo", From fdc373e368be3ce95567d6c3200eb5051352ed1f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 13 May 2025 16:02:28 +0000 Subject: [PATCH 2/3] chore: update tag_info.json with potential release versions [skip ci] --- tag_info.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tag_info.json b/tag_info.json index bd44a4250..6790bdcee 100644 --- a/tag_info.json +++ b/tag_info.json @@ -1,7 +1,7 @@ { - "api_tag": "api/v0.1.6", "api_version": "0.1.6" + "api_tag": "api/v0.1.7", "api_version": "0.1.7" , - "web_tag": "web/v0.1.6", "web_version": "0.1.6" + "web_tag": "web/v0.1.7", "web_version": "0.1.7" , - "cli_tag": "cli/v0.1.6", "cli_version": "0.1.6" + "cli_tag": "cli/v0.1.7", "cli_version": "0.1.7" } From 341f7c6b24a2e7df33539561f20d44afdd995fdc Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Tue, 13 May 2025 12:00:59 -0600 Subject: [PATCH 3/3] 402 redirect error --- web/src/api/buster_rest/users/queryRequests.ts | 6 ++++-- web/src/api/createInstance.ts | 9 +++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/web/src/api/buster_rest/users/queryRequests.ts b/web/src/api/buster_rest/users/queryRequests.ts index e465b4040..c3369acfc 100644 --- a/web/src/api/buster_rest/users/queryRequests.ts +++ b/web/src/api/buster_rest/users/queryRequests.ts @@ -123,12 +123,14 @@ export const useCreateUserOrganization = () => { const onCreateUserOrganization = useMemoizedFn( async ({ name, company }: { name: string; company: string }) => { const alreadyHasOrganization = !!userResponse?.organizations?.[0]; - if (userResponse) + if (!alreadyHasOrganization) await createOrganization({ name: company }); + if (userResponse) { await updateUserInfo({ userId: userResponse.user.id, name }); - if (!alreadyHasOrganization) await createOrganization({ name: company }); + await refetchUserResponse(); + } await refetchUserResponse(); } ); diff --git a/web/src/api/createInstance.ts b/web/src/api/createInstance.ts index f22b2bfd7..d0799570c 100644 --- a/web/src/api/createInstance.ts +++ b/web/src/api/createInstance.ts @@ -4,6 +4,7 @@ import { AxiosRequestHeaders } from 'axios'; import { isServer } from '@tanstack/react-query'; import { getSupabaseTokenFromCookies } from './createServerInstance'; import { SupabaseContextReturnType } from '@/context/Supabase/SupabaseContextProvider'; +import { BusterRoutes, createBusterRoute } from '@/routes'; const AXIOS_TIMEOUT = 120000; // 2 minutes @@ -21,6 +22,14 @@ export const createInstance = (baseURL: string) => { return resp; }, (error: AxiosError) => { + const errorCode = error.response?.status; + //402 is the payment required error code + if (errorCode === 402) { + window.location.href = createBusterRoute({ + route: BusterRoutes.INFO_GETTING_STARTED + }); + } + return Promise.reject(rustErrorHandler(error)); } );