@@ -55,9 +55,10 @@ public static Result HostFailure(
5555 int ? sshRemoteGatewayPort )
5656 {
5757 var state = connectionRefused ? Kind . HostAbsent : Kind . HostUnreachable ;
58+ var endpointDescription = DescribeEndpoint ( provenance ) ;
5859 var summary = connectionRefused
59- ? $ "no browser-control host is listening at 127.0.0.1:{ localPort } ."
60- : $ "the browser-control host at 127.0.0.1:{ localPort } did not respond.";
60+ ? $ "no browser-control host is listening at 127.0.0.1:{ localPort } ( { endpointDescription } ) ."
61+ : $ "the browser-control host at 127.0.0.1:{ localPort } ( { endpointDescription } ) did not respond.";
6162 var repair = provenance == BrowserControlEndpoint . Provenance . ManagedSshForward ||
6263 sshRemoteGatewayPort is not null
6364 ? BuildSshRepair ( localPort , sshRemoteGatewayPort )
@@ -85,8 +86,8 @@ public static Result FromHttpStatus(
8586 return hasSharedToken
8687 ? new Result (
8788 Kind . AuthenticationRejected ,
88- "the browser-control host rejected the saved shared gateway token." ,
89- "Update the Gateway Token in Settings so it matches browser-control auth , or disable Browser proxy bridge." ,
89+ "the browser-control host rejected authentication for the saved shared gateway token." ,
90+ "Update the Gateway Token in Settings so it matches browser-control authentication , or disable Browser proxy bridge." ,
9091 provenance )
9192 : new Result (
9293 Kind . AuthenticationRequired ,
@@ -106,4 +107,13 @@ private static string BuildSshRepair(int localPort, int? sshRemoteGatewayPort)
106107 "Start the remote browser-control host, then retry. " +
107108 "If browser control is not intended, disable Browser proxy bridge in Settings." ;
108109 }
110+
111+ private static string DescribeEndpoint ( BrowserControlEndpoint . Provenance provenance ) => provenance switch
112+ {
113+ BrowserControlEndpoint . Provenance . ExplicitOverride =>
114+ "configured explicit browser-control port" ,
115+ BrowserControlEndpoint . Provenance . ManagedSshForward =>
116+ "managed SSH browser-control forward" ,
117+ _ => "derived from gateway port + 2" ,
118+ } ;
109119}
0 commit comments