Skip to content

Commit d6236aa

Browse files
committed
fix(setupServer): print a dev utils error on failed remote connection
1 parent c21f0bd commit d6236aa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/node/SetupServerApi.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { RemoteRequestHandler } from '~/core/handlers/RemoteRequestHandler'
1313
import { shouldBypassRequest } from '~/core/utils/internal/requestUtils'
1414
import { getRemoteContextFromEnvironment } from './remoteContext'
1515
import { LifeCycleEventsMap } from '~/core/sharedOptions'
16+
import { devUtils } from '~/core/utils/internal/devUtils'
1617

1718
const handlersStorage = new AsyncLocalStorage<RequestHandlersContext>()
1819

@@ -143,9 +144,9 @@ export class SetupServerApi
143144
)
144145
},
145146
() => {
146-
// eslint-disable-next-line no-console
147-
console.error(
148-
`Failed to connect to a remote server at "${remoteContext.serverUrl}"`,
147+
devUtils.error(
148+
'Failed to enable remote mode: could not connect to the remote server at "%s"',
149+
remoteContext.serverUrl,
149150
)
150151
},
151152
)

0 commit comments

Comments
 (0)