diff --git a/apps/webapp/app/routes/api.v1.deployments.$deploymentId.build-env-vars.ts b/apps/webapp/app/routes/api.v1.deployments.$deploymentId.build-env-vars.ts index 3edb3b8a8..739046df1 100644 --- a/apps/webapp/app/routes/api.v1.deployments.$deploymentId.build-env-vars.ts +++ b/apps/webapp/app/routes/api.v1.deployments.$deploymentId.build-env-vars.ts @@ -86,24 +86,8 @@ export async function loader({ request, params }: LoaderFunctionArgs) { ); } - let variables: Record; - - try { - const decrypted = await decryptSecret(env.ENCRYPTION_KEY, envelope.data); - variables = z.record(z.string()).parse(JSON.parse(decrypted)); - } catch (error) { - logger.error("Failed to decrypt stored build env vars", { - deploymentId, - environmentId: authenticatedEnv.id, - error, - }); - return json( - { - error: "The stored build environment variables could not be decrypted. Retry the deploy.", - }, - { status: 500 } - ); - } + const decrypted = await decryptSecret(env.ENCRYPTION_KEY, envelope.data); + const variables = z.record(z.string()).parse(JSON.parse(decrypted)); return json({ variables } satisfies GetDeploymentBuildEnvVarsResponseBody, { status: 200 }); } catch (error) { diff --git a/apps/webapp/app/services/platform.v3.server.ts b/apps/webapp/app/services/platform.v3.server.ts index 48fdd2270..2b7e8fb3d 100644 --- a/apps/webapp/app/services/platform.v3.server.ts +++ b/apps/webapp/app/services/platform.v3.server.ts @@ -1236,8 +1236,6 @@ export function isCloud(): boolean { return true; } - // Preview environments are cloud installs too; without this the billing client silently no-ops. - // Optional chaining because test suites mock the env module with partial objects. if (env.LOGIN_ORIGIN?.endsWith(".triggerlabs.dev")) { return true; }