File tree Expand file tree Collapse file tree
infra/relay/src/environments Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -540,12 +540,15 @@ export const makeServerLayer = Layer.unwrap(
540540 // On reboot this races NIC/DNS bring-up, so back off exponentially
541541 // (capped at 30s) instead of burning all retries in a second.
542542 // Bounded overall so a permanently broken setup still surfaces the
543- // warning below. Bad-request/unauthorized are deterministic local
544- // failures that no amount of retrying converges.
543+ // warning below. Bad-request/unauthorized/conflict are
544+ // deterministic failures (malformed origin, not linked yet, linked
545+ // to a different cloud account) that no amount of retrying
546+ // converges.
545547 Effect . retry ( {
546548 while : ( error ) =>
547549 error . _tag !== "EnvironmentHttpBadRequestError" &&
548- error . _tag !== "EnvironmentHttpUnauthorizedError" ,
550+ error . _tag !== "EnvironmentHttpUnauthorizedError" &&
551+ error . _tag !== "EnvironmentHttpConflictError" ,
549552 schedule : Schedule . exponential ( "1 second" ) . pipe (
550553 Schedule . modifyDelay ( ( { duration } ) =>
551554 Effect . succeed ( Duration . min ( duration , Duration . seconds ( 30 ) ) ) ,
Original file line number Diff line number Diff line change @@ -45,14 +45,8 @@ import * as ManagedEndpointAllocations from "./ManagedEndpointAllocations.ts";
4545import * as RelayConfiguration from "../Config.ts" ;
4646import { isManagedEndpointHostname } from "../deploymentConfig.ts" ;
4747
48- // The reason set is part of the public relay contract so clients can render
49- // specific diagnostics (e.g. "your server never linked" vs. a real auth issue).
50- export const EnvironmentConnectNotAuthorizedReason = RelayEnvironmentConnectNotAuthorizedReason ;
51- export type EnvironmentConnectNotAuthorizedReason =
52- typeof EnvironmentConnectNotAuthorizedReason . Type ;
53-
5448function environmentConnectNotAuthorizedReasonMessage (
55- reason : EnvironmentConnectNotAuthorizedReason ,
49+ reason : RelayEnvironmentConnectNotAuthorizedReason ,
5650) : string {
5751 switch ( reason ) {
5852 case "client_proof_key_thumbprint_missing" :
@@ -79,7 +73,7 @@ export class EnvironmentConnectNotAuthorized extends Schema.TaggedErrorClass<Env
7973 {
8074 environmentId : Schema . String ,
8175 operation : Schema . Literals ( [ "connect" , "status" ] ) ,
82- reason : EnvironmentConnectNotAuthorizedReason ,
76+ reason : RelayEnvironmentConnectNotAuthorizedReason ,
8377 } ,
8478) {
8579 override get message ( ) : string {
You can’t perform that action at this time.
0 commit comments