bodhi-realtime-agent / ConnectFailure
Interface: ConnectFailure
Defined in: src/types/transport.ts:526
Why a connect attempt failed before setupComplete. Reported on the attempt-close and setup-failed lifecycle events of a transport that authenticates each connect with a credential provider (the Gemini transport's credentialProvider); those events also carry the provider's meta once it has returned. Absent without a provider.
provider: the credential provider threw, was aborted (its share of the connect deadline ran out, or the attempt was superseded), or returned a credential the transport refuses.erroris what it threw.dial: the socket never opened (a refused upgrade, a reset, the deadline).session: the socket opened and closed, or timed out, beforesetupComplete, for example when Gemini refused the token or the setup.
Do not log message, reason or error verbatim. They carry what the provider threw and what the server said, which can include a token endpoint's URL or response body, or a credential. source, code, status and retryable carry no provider text.
Properties
code?
optionalcode?:number
Defined in: src/types/transport.ts:532
WebSocket close code, when the socket closed.
error?
optionalerror?:unknown
Defined in: src/types/transport.ts:539
What the credential provider threw or aborted with (source: 'provider'), as thrown: it holds whatever the provider put in it.
message
message:
string
Defined in: src/types/transport.ts:530
The provider's error message, the timeout, or the close description. May contain provider-supplied text (see above).
reason?
optionalreason?:string
Defined in: src/types/transport.ts:534
WebSocket close reason, when the socket closed with one.
retryable?
optionalretryable?:false
Defined in: src/types/transport.ts:543
false when the provider marked its error as permanent (it threw an error whose retryable property is false): a session does not retry the connect. Absent otherwise, and a session may retry.
source
source:
"session"|"provider"|"dial"
Defined in: src/types/transport.ts:527
status?
optionalstatus?:number
Defined in: src/types/transport.ts:536
HTTP status of a refused WebSocket upgrade, when the SDK reported one.