@replit/river 0.211.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.
@@ -5,12 +5,12 @@ import {
5
5
  SessionStateGraph,
6
6
  defaultClientTransportOptions,
7
7
  defaultTransportOptions
8
- } from "../chunk-XGMOSWIO.js";
9
- import "../chunk-CC7RN7GI.js";
8
+ } from "../chunk-HF3YOJSZ.js";
10
9
  import {
11
10
  currentProtocolVersion,
12
11
  getTracer
13
- } from "../chunk-JJWYHDIJ.js";
12
+ } from "../chunk-U3SFVBPB.js";
13
+ import "../chunk-CC7RN7GI.js";
14
14
 
15
15
  // testUtil/index.ts
16
16
  import NodeWs, { WebSocketServer } from "ws";
@@ -57,7 +57,7 @@ var Observable = class {
57
57
  };
58
58
 
59
59
  // testUtil/duplex/duplexPair.ts
60
- import { Duplex } from "node:stream";
60
+ import { Duplex } from "stream";
61
61
  import assert from "assert";
62
62
  var kCallback = Symbol("Callback");
63
63
  var kInitOtherSide = Symbol("InitOtherSide");
@@ -678,7 +678,7 @@ function coerceErrorString(err) {
678
678
  }
679
679
 
680
680
  // package.json
681
- var version = "0.211.0";
681
+ var version = "0.212.1";
682
682
 
683
683
  // tracing/index.ts
684
684
  function getPropagationContext(ctx) {
@@ -2080,7 +2080,21 @@ var ClientTransport = class extends Transport {
2080
2080
  async sendHandshake(session) {
2081
2081
  let metadata = void 0;
2082
2082
  if (this.handshakeExtensions) {
2083
- metadata = await this.handshakeExtensions.construct();
2083
+ try {
2084
+ metadata = await this.handshakeExtensions.construct();
2085
+ } catch (err) {
2086
+ const errStr = coerceErrorString(err);
2087
+ this.log?.error(
2088
+ `failed to construct handshake metadata for session to ${session.to}: ${errStr}`,
2089
+ session.loggingMetadata
2090
+ );
2091
+ this.protocolError({
2092
+ type: ProtocolError.HandshakeFailed,
2093
+ message: `failed to construct handshake metadata: ${errStr}`
2094
+ });
2095
+ this.deleteSession(session, { unhealthy: true });
2096
+ return;
2097
+ }
2084
2098
  }
2085
2099
  if (session._isConsumed) {
2086
2100
  return;