{"record":{"id":"3faac8ec3e4bd78a","repo":"paperclipai/paperclip","slug":"select-a-company-to-test-adapter-environment","errorCode":null,"errorMessage":"Select a company to test adapter environment","messagePattern":"Select a company to test adapter environment","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ui/src/components/AgentConfigForm.tsx","lineNumber":899,"sourceCode":"        // The agent has no own environment, so the Test resolves the instance\n        // default, the local default, or the managed sandbox. Resolve the\n        // settings, the environment list, and the managed-sandbox-only policy\n        // here, because the render-time queries can be unsettled, or the\n        // environments query can be disabled under the managed-sandbox-only\n        // policy. A failure surfaces an honest error, not a silent host probe\n        // that reports a false result.\n        try {\n          const [resolvedSettings, resolvedEnvironments, resolvedExperimental] =\n            await Promise.all([\n              queryClient.ensureQueryData({\n                queryKey: queryKeys.instance.settings,\n                queryFn: () => instanceSettingsApi.get(),\n              }),\n              queryClient.ensureQueryData({\n                queryKey: queryKeys.environments.list(selectedCompanyId),\n                queryFn: () => environmentsApi.list(selectedCompanyId),\n              }),\n              queryClient.ensureQueryData({\n                queryKey: queryKeys.instance.experimentalSettings,\n                queryFn: () => instanceSettingsApi.getExperimental(),\n              }),\n            ]);\n          settings = resolvedSettings;\n          environmentList = resolvedEnvironments;\n          managedSandboxOnly = resolvedExperimental?.enableManagedSandboxOnly === true;\n        } catch {\n          throw new Error(\n            \"Could not load environment settings to determine which environment to test in. Retry the test.\",\n          );\n        }\n      }\n      // Mirror the server run-time resolution, including the managed-sandbox-only\n      // redirect: when the resolution lands on the local environment and the\n      // policy is on, probe the managed sandbox the real run uses instead. The\n      // resolver throws when no managed sandbox is available, which the mutation\n      // surfaces as a fail-closed error rather than a local host probe.","sourceCodeStart":881,"sourceCodeEnd":917,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/ui/src/components/AgentConfigForm.tsx#L881-L917","documentation":"The 'test environment' mutation was triggered while no company is selected in the agent form. The adapter environment test runs against a company's environment, so the client-side guard blocks the call.","triggerScenarios":"Thrown at ui/src/components/AgentConfigForm.tsx:828 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Select a company from the company picker before testing the adapter environment."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}