diff --git a/frontend/src/components/actors/actor-general.tsx b/frontend/src/components/actors/actor-general.tsx index 098642ec72..9b11bee23e 100644 --- a/frontend/src/components/actors/actor-general.tsx +++ b/frontend/src/components/actors/actor-general.tsx @@ -39,7 +39,11 @@ export function ActorGeneral({ actorId }: ActorGeneralProps) {
ID
- + {actorId}
@@ -64,6 +68,7 @@ export function ActorGeneral({ actorId }: ActorGeneralProps) { {createdAt ? formatISO(createdAt) : "n/a"} @@ -81,6 +86,7 @@ export function ActorGeneral({ actorId }: ActorGeneralProps) { ? formatISO(pendingAllocationAt) : "n/a" } + className="-mx-2" > {pendingAllocationAt ? formatISO(pendingAllocationAt) @@ -95,6 +101,7 @@ export function ActorGeneral({ actorId }: ActorGeneralProps) { > {sleepingAt ? formatISO(sleepingAt) : "n/a"} @@ -121,6 +129,7 @@ export function ActorGeneral({ actorId }: ActorGeneralProps) { > {destroyedAt ? formatISO(destroyedAt) : "n/a"} diff --git a/frontend/src/components/actors/actor-state-tab.tsx b/frontend/src/components/actors/actor-state-tab.tsx index 0cdb436b6b..9a130da3f6 100644 --- a/frontend/src/components/actors/actor-state-tab.tsx +++ b/frontend/src/components/actors/actor-state-tab.tsx @@ -58,7 +58,7 @@ export function ActorStateTab({ actorId }: ActorStateTabProps) { export function Info({ children }: PropsWithChildren) { return ( -
+
{children}
); diff --git a/frontend/src/components/actors/guard-connectable-inspector.tsx b/frontend/src/components/actors/guard-connectable-inspector.tsx index 5056981ac1..3305f4f6f0 100644 --- a/frontend/src/components/actors/guard-connectable-inspector.tsx +++ b/frontend/src/components/actors/guard-connectable-inspector.tsx @@ -82,9 +82,11 @@ export function GuardConnectableInspector({ - Cannot start Actor, runners are out of capacity. Add - more runners to run the Actor or increase runner - capacity. +

Cannot start Actor, runners are out of capacity.

+

+ Add more runners to run the Actor or increase runner + capacity. +

} > diff --git a/frontend/src/queries/manager-engine.ts b/frontend/src/queries/manager-engine.ts index 043c73e2f1..0c9864d703 100644 --- a/frontend/src/queries/manager-engine.ts +++ b/frontend/src/queries/manager-engine.ts @@ -18,7 +18,7 @@ import { ActorQueryOptionsSchema, createDefaultManagerContext, } from "@/components/actors/manager-context"; -import { shouldRetryAllExpect403, throwAllExpect403 } from "./utils"; +import { noThrow, shouldRetryAllExpect403 } from "./utils"; export const createClient = (opts: { token: (() => string) | string }) => new RivetClient({ @@ -53,7 +53,7 @@ export const createEngineManagerContext = ({ return true; }, retry: shouldRetryAllExpect403, - throwOnError: throwAllExpect403, + throwOnError: noThrow, meta: { mightRequireAuth: true, }, @@ -74,7 +74,7 @@ export const createEngineManagerContext = ({ }; }, retry: shouldRetryAllExpect403, - throwOnError: throwAllExpect403, + throwOnError: noThrow, meta: { mightRequireAuth: true, }, @@ -100,7 +100,7 @@ export const createEngineManagerContext = ({ throw new Error(`Region not found: ${regionId}`); }, retry: shouldRetryAllExpect403, - throwOnError: throwAllExpect403, + throwOnError: noThrow, meta: { mightRequireAuth: true, }, @@ -124,7 +124,7 @@ export const createEngineManagerContext = ({ return transformActor(data.actors[0]); }, retry: shouldRetryAllExpect403, - throwOnError: throwAllExpect403, + throwOnError: noThrow, meta: { mightRequireAuth: true, }, @@ -199,7 +199,7 @@ export const createEngineManagerContext = ({ return lastPage.pagination.cursor; }, retry: shouldRetryAllExpect403, - throwOnError: throwAllExpect403, + throwOnError: noThrow, meta: { mightRequireAuth: true, }, @@ -237,7 +237,7 @@ export const createEngineManagerContext = ({ return lastPage.pagination.cursor; }, retry: shouldRetryAllExpect403, - throwOnError: throwAllExpect403, + throwOnError: noThrow, meta: { mightRequireAuth: true, }, @@ -260,7 +260,7 @@ export const createEngineManagerContext = ({ return response.actor.actorId; }, onSuccess: () => {}, - throwOnError: throwAllExpect403, + throwOnError: noThrow, retry: shouldRetryAllExpect403, meta: { mightRequireAuth: true, @@ -270,7 +270,7 @@ export const createEngineManagerContext = ({ actorDestroyMutationOptions(actorId) { return { ...def.actorDestroyMutationOptions(actorId), - throwOnError: throwAllExpect403, + throwOnError: noThrow, retry: shouldRetryAllExpect403, meta: { mightRequireAuth: true, @@ -309,7 +309,7 @@ export const runnersQueryOptions = (opts: { namespace: NamespaceNameId }) => { }, select: (data) => data.pages.flatMap((page) => page.runners), retry: shouldRetryAllExpect403, - throwOnError: throwAllExpect403, + throwOnError: noThrow, meta: { mightRequireAuth: true, }, @@ -333,7 +333,7 @@ export const runnerQueryOptions = (opts: { ); return data.runner; }, - throwOnError: throwAllExpect403, + throwOnError: noThrow, retry: shouldRetryAllExpect403, meta: { mightRequireAuth: true, @@ -360,7 +360,7 @@ export const runnerByNameQueryOptions = (opts: { } return data.runners[0]; }, - throwOnError: throwAllExpect403, + throwOnError: noThrow, retry: shouldRetryAllExpect403, meta: { mightRequireAuth: true, @@ -394,7 +394,7 @@ export const runnerNamesQueryOptions = (opts: { return lastPage.pagination.cursor; }, select: (data) => data.pages.flatMap((page) => page.names), - throwOnError: throwAllExpect403, + throwOnError: noThrow, retry: shouldRetryAllExpect403, meta: { mightRequireAuth: true, @@ -423,7 +423,7 @@ export const namespacesQueryOptions = () => { return lastPage.pagination.cursor; }, select: (data) => data.pages.flatMap((page) => page.namespaces), - throwOnError: throwAllExpect403, + throwOnError: noThrow, retry: shouldRetryAllExpect403, meta: { mightRequireAuth: true, @@ -447,7 +447,7 @@ export const namespaceQueryOptions = ( : skipToken, retry: shouldRetryAllExpect403, - throwOnError: throwAllExpect403, + throwOnError: noThrow, meta: { mightRequireAuth: true, }, diff --git a/frontend/src/queries/utils.ts b/frontend/src/queries/utils.ts index 86e0317b01..bf27f9ae62 100644 --- a/frontend/src/queries/utils.ts +++ b/frontend/src/queries/utils.ts @@ -15,16 +15,9 @@ export const shouldRetryAllExpect403 = (failureCount: number, error: Error) => { return true; }; -export const throwAllExpect403 = >( +export const noThrow = >( error: Error, - _query: T, + query: T, ) => { - if (error && "statusCode" in error) { - if (error.statusCode === 403) { - // Don't throw on auth errors - return false; - } - } - - return true; + return false; };