@replit/river 0.212.0 → 0.212.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,3 @@
1
- import {
2
- BaseLogger,
3
- createLogProxy
4
- } from "./chunk-CC7RN7GI.js";
5
1
  import {
6
2
  ControlMessageHandshakeRequestSchema,
7
3
  ControlMessageHandshakeResponseSchema,
@@ -20,7 +16,11 @@ import {
20
16
  handshakeResponseMessage,
21
17
  isAcceptedProtocolVersion,
22
18
  isAck
23
- } from "./chunk-S6I4XLQG.js";
19
+ } from "./chunk-U3SFVBPB.js";
20
+ import {
21
+ BaseLogger,
22
+ createLogProxy
23
+ } from "./chunk-CC7RN7GI.js";
24
24
 
25
25
  // transport/events.ts
26
26
  var ProtocolError = {
@@ -1753,7 +1753,21 @@ var ClientTransport = class extends Transport {
1753
1753
  async sendHandshake(session) {
1754
1754
  let metadata = void 0;
1755
1755
  if (this.handshakeExtensions) {
1756
- metadata = await this.handshakeExtensions.construct();
1756
+ try {
1757
+ metadata = await this.handshakeExtensions.construct();
1758
+ } catch (err) {
1759
+ const errStr = coerceErrorString(err);
1760
+ this.log?.error(
1761
+ `failed to construct handshake metadata for session to ${session.to}: ${errStr}`,
1762
+ session.loggingMetadata
1763
+ );
1764
+ this.protocolError({
1765
+ type: ProtocolError.HandshakeFailed,
1766
+ message: `failed to construct handshake metadata: ${errStr}`
1767
+ });
1768
+ this.deleteSession(session, { unhealthy: true });
1769
+ return;
1770
+ }
1757
1771
  }
1758
1772
  if (session._isConsumed) {
1759
1773
  return;
@@ -2331,4 +2345,4 @@ export {
2331
2345
  WebSocketConnection,
2332
2346
  CodecMessageAdapter
2333
2347
  };
2334
- //# sourceMappingURL=chunk-FW4QYF33.js.map
2348
+ //# sourceMappingURL=chunk-HF3YOJSZ.js.map