@openfin/node-adapter 40.82.3 → 40.82.4

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.
Files changed (2) hide show
  1. package/out/node-adapter.js +184 -35
  2. package/package.json +2 -2
@@ -355,19 +355,57 @@ var NotImplementedError_1 = transportErrors.NotImplementedError = NotImplemented
355
355
  class NotSupportedError extends Error {
356
356
  }
357
357
  var NotSupportedError_1 = transportErrors.NotSupportedError = NotSupportedError;
358
- class InternalError extends Error {
358
+ class DeserializedError extends Error {
359
359
  constructor(err) {
360
360
  const { message, name, stack, ...rest } = err;
361
361
  super(message);
362
+ if ('cause' in err && err.cause) {
363
+ this.cause = new DeserializedError(err.cause);
364
+ }
362
365
  this.name = name || 'Error';
363
366
  this.stack = stack ?? this.toString();
364
- Object.keys(rest).forEach(key => {
367
+ Object.keys(rest)
368
+ .filter((k) => k !== 'cause')
369
+ .forEach((key) => {
365
370
  this[key] = rest[key];
366
371
  });
367
372
  }
368
373
  }
369
374
  // For documentation of the error methods being used see here: https://v8.dev/docs/stack-trace-api
370
375
  class RuntimeError extends Error {
376
+ static trimEndCallSites(err, takeUntilRegex) {
377
+ // save original props
378
+ const length = Error.stackTraceLimit;
379
+ // eslint-disable-next-line no-underscore-dangle
380
+ const _prepareStackTrace = Error.prepareStackTrace;
381
+ // This will be called when we access the `stack` property
382
+ Error.prepareStackTrace = (_, stack) => stack;
383
+ // in channel errors, the error was already serialized so we need to handle both string and CallSite[]
384
+ const isString = typeof err.stack === 'string';
385
+ const stack = (isString ? err.stack?.split('\n') : err.stack) ?? [];
386
+ // restore original props
387
+ Error.prepareStackTrace = _prepareStackTrace;
388
+ Error.stackTraceLimit = length;
389
+ // stack is optional in non chromium contexts
390
+ if (stack.length) {
391
+ const newStack = [];
392
+ // remove this call ONLY if it's not a string
393
+ for (const line of isString ? stack : stack.slice(1)) {
394
+ // inclusive take until
395
+ newStack.push(line);
396
+ if (takeUntilRegex.test(line.toString())) {
397
+ break;
398
+ }
399
+ }
400
+ if (isString) {
401
+ // maintain it as a string
402
+ err.stack = newStack.join('\n');
403
+ }
404
+ else {
405
+ err.stack = RuntimeError.prepareStackTrace(err, newStack);
406
+ }
407
+ }
408
+ }
371
409
  static getCallSite(callsToRemove = 0) {
372
410
  const length = Error.stackTraceLimit;
373
411
  const realCallsToRemove = callsToRemove + 1; // remove this call;
@@ -386,21 +424,82 @@ class RuntimeError extends Error {
386
424
  if (typeof Error.prepareStackTrace === 'function') {
387
425
  return Error.prepareStackTrace(err, callSites);
388
426
  }
389
- let string = "";
390
- string += err.name || "Error";
391
- string += `: ${err.message || ""}`;
392
- for (const callSite of callSites) {
393
- string += `\n at ${callSite.toString()}`;
394
- }
395
- return string;
396
- }
397
- ;
427
+ // TODO: this is just a first iteration, we can make this "nicer" at some point
428
+ // const EXCLUSIONS = ['IpcRenderer', 'Object.onMessage', 'Transport.onmessage', 'MessageReceiver.onmessage'];
429
+ let stackTrace = `${err.name || 'Error'}: ${err.message || ''}\n`;
430
+ stackTrace += callSites
431
+ .map((line) => ` at ${line}`)
432
+ // .filter((line) => !EXCLUSIONS.some((l) => line.includes(l)))
433
+ .join('\n');
434
+ return stackTrace;
435
+ }
436
+ /*
437
+
438
+ NON filtered stack trace example from MTP page channel-errors.tsx:
439
+
440
+ Caused by: ChannelError: Error from ch0
441
+ at ChannelClient.dispatch (<anonymous>:3:119560)
442
+ at eval (test-channel-errors.tsx:73:26)
443
+ at ChannelProvider.processAction (<anonymous>:3:116748)
444
+ at ChannelProvider.processAction (<anonymous>:3:149121)
445
+ at MessageReceiver.processChannelMessage (<anonymous>:3:131909)
446
+ at MessageReceiver.onmessage (<anonymous>:3:131232)
447
+ at Transport.onmessage (<anonymous>:3:282049)
448
+ at IpcRenderer.<anonymous> (<anonymous>:3:275150)
449
+ at IpcRenderer.emit (node:electron/js2c/sandbox_bundle:2:34834)
450
+ at Object.onMessage (node:electron/js2c/sandbox_bundle:2:51566)
451
+ Caused by: ChannelError: Error from ch0
452
+ at ChannelClient.dispatch (<anonymous>:3:119560)
453
+ at eval (test-channel-errors.tsx:73:26)
454
+ at ChannelProvider.processAction (<anonymous>:3:116748)
455
+ at ChannelProvider.processAction (<anonymous>:3:149121)
456
+ at MessageReceiver.processChannelMessage (<anonymous>:3:131909)
457
+ at MessageReceiver.onmessage (<anonymous>:3:131232)
458
+ at Transport.onmessage (<anonymous>:3:282049)
459
+ at IpcRenderer.<anonymous> (<anonymous>:3:275150)
460
+ at IpcRenderer.emit (node:electron/js2c/sandbox_bundle:2:34834)
461
+ at Object.onMessage (node:electron/js2c/sandbox_bundle:2:51566)
462
+ Caused by: ChannelError: Error from ch0
463
+ at ChannelClient.dispatch (<anonymous>:3:119560)
464
+ at eval (test-channel-errors.tsx:73:26)
465
+ at ChannelProvider.processAction (<anonymous>:3:116748)
466
+ at ChannelProvider.processAction (<anonymous>:3:149121)
467
+ at MessageReceiver.processChannelMessage (<anonymous>:3:131909)
468
+ at MessageReceiver.onmessage (<anonymous>:3:131232)
469
+ at Transport.onmessage (<anonymous>:3:282049)
470
+ at IpcRenderer.<anonymous> (<anonymous>:3:275150)
471
+ at IpcRenderer.emit (node:electron/js2c/sandbox_bundle:2:34834)
472
+ at Object.onMessage (node:electron/js2c/sandbox_bundle:2:51566)
473
+ Caused by: ChannelError: Error from ch0
474
+ at ChannelClient.dispatch (<anonymous>:3:119560)
475
+ at eval (test-channel-errors.tsx:50:23)
476
+ at ChannelProvider.processAction (<anonymous>:3:116748)
477
+ at ChannelProvider.processAction (<anonymous>:3:149121)
478
+ at MessageReceiver.processChannelMessage (<anonymous>:3:131909)
479
+ at MessageReceiver.onmessage (<anonymous>:3:131232)
480
+ at Transport.onmessage (<anonymous>:3:282049)
481
+ at IpcRenderer.<anonymous> (<anonymous>:3:275150)
482
+ at IpcRenderer.emit (node:electron/js2c/sandbox_bundle:2:34834)
483
+ at Object.onMessage (node:electron/js2c/sandbox_bundle:2:51566)
484
+ Caused by: Error: Error from ch0
485
+ at eval (test-channel-errors.tsx:54:19)
486
+ at ChannelProvider.processAction (<anonymous>:3:116748)
487
+ at ChannelProvider.processAction (<anonymous>:3:149121)
488
+ at MessageReceiver.processChannelMessage (<anonymous>:3:131909)
489
+ at MessageReceiver.onmessage (<anonymous>:3:131232)
490
+ at Transport.onmessage (<anonymous>:3:282049)
491
+ at IpcRenderer.<anonymous> (<anonymous>:3:275150)
492
+ at IpcRenderer.emit (node:electron/js2c/sandbox_bundle:2:34834)
493
+ at Object.onMessage (node:electron/js2c/sandbox_bundle:2:51566)
494
+
495
+
496
+ */
398
497
  constructor(payload, callSites) {
399
498
  const { reason, error } = payload;
400
499
  super(reason);
401
- this.name = 'RuntimeError';
500
+ this.name = this.constructor.name;
402
501
  if (error?.stack) {
403
- this.cause = new InternalError(error);
502
+ this.cause = new DeserializedError(error);
404
503
  }
405
504
  if (callSites) {
406
505
  this.stack = RuntimeError.prepareStackTrace(this, callSites);
@@ -2751,9 +2850,14 @@ function requireInstance$2 () {
2751
2850
  // don't expose
2752
2851
  });
2753
2852
  const layoutWindow = await this.getCurrentWindow();
2853
+ let layoutWindowIdentity = layoutWindow.identity;
2854
+ // TODO: CORE-1857 - when we tearout active layout or drag a view out of a window, the above identity includes the whole window info.
2855
+ if (layoutWindowIdentity.identity) {
2856
+ layoutWindowIdentity = layoutWindowIdentity.identity;
2857
+ }
2754
2858
  try {
2755
2859
  const providerChannelClient = await __classPrivateFieldGet(this, _View_providerChannelClient, "f").getValue();
2756
- const client = await layout_entities_1.LayoutNode.newLayoutEntitiesClient(providerChannelClient, layout_constants_1.LAYOUT_CONTROLLER_ID, layoutWindow.identity);
2860
+ const client = await layout_entities_1.LayoutNode.newLayoutEntitiesClient(providerChannelClient, layout_constants_1.LAYOUT_CONTROLLER_ID, layoutWindowIdentity);
2757
2861
  const layoutIdentity = await client.getLayoutIdentityForViewOrThrow(this.identity);
2758
2862
  return this.fin.Platform.Layout.wrap(layoutIdentity);
2759
2863
  }
@@ -2766,7 +2870,7 @@ function requireInstance$2 () {
2766
2870
  throw e;
2767
2871
  }
2768
2872
  // fallback logic for missing endpoint
2769
- return this.fin.Platform.Layout.wrap(layoutWindow.identity);
2873
+ return this.fin.Platform.Layout.wrap(layoutWindowIdentity);
2770
2874
  }
2771
2875
  };
2772
2876
  /**
@@ -5642,7 +5746,7 @@ function requireWindow () {
5642
5746
  Object.defineProperty(system, "__esModule", { value: true });
5643
5747
  system.System = void 0;
5644
5748
  const base_1$i = base;
5645
- const transport_errors_1$2 = transportErrors;
5749
+ const transport_errors_1$6 = transportErrors;
5646
5750
  const window_1 = requireWindow();
5647
5751
  const events_1$6 = require$$0;
5648
5752
  /**
@@ -6732,9 +6836,9 @@ class System extends base_1$i.EmitterBase {
6732
6836
  });
6733
6837
  // node.js environment not supported
6734
6838
  if (this.wire.environment.type !== 'openfin') {
6735
- throw new transport_errors_1$2.NotSupportedError('downloadAsset only supported in an OpenFin Render process');
6839
+ throw new transport_errors_1$6.NotSupportedError('downloadAsset only supported in an OpenFin Render process');
6736
6840
  }
6737
- const callSite = transport_errors_1$2.RuntimeError.getCallSite();
6841
+ const callSite = transport_errors_1$6.RuntimeError.getCallSite();
6738
6842
  const downloadId = this.wire.environment.getNextMessageId().toString();
6739
6843
  const dlProgressKey = `asset-download-progress-${downloadId}`;
6740
6844
  const dlErrorKey = `asset-download-error-${downloadId}`;
@@ -6754,7 +6858,7 @@ class System extends base_1$i.EmitterBase {
6754
6858
  const dlError = (payload) => {
6755
6859
  cleanListeners();
6756
6860
  const { reason, err: error } = payload;
6757
- reject(new transport_errors_1$2.RuntimeError({ reason, error }, callSite));
6861
+ reject(new transport_errors_1$6.RuntimeError({ reason, error }, callSite));
6758
6862
  };
6759
6863
  const dlComplete = () => {
6760
6864
  cleanListeners();
@@ -6805,11 +6909,11 @@ class System extends base_1$i.EmitterBase {
6805
6909
  * ```
6806
6910
  */
6807
6911
  downloadRuntime(options, progressListener) {
6808
- const callsites = transport_errors_1$2.RuntimeError.getCallSite();
6912
+ const callsites = transport_errors_1$6.RuntimeError.getCallSite();
6809
6913
  return new Promise((resolve, reject) => {
6810
6914
  // node.js environment not supported
6811
6915
  if (this.wire.environment.type !== 'openfin') {
6812
- reject(new transport_errors_1$2.NotSupportedError('downloadRuntime only supported in an OpenFin Render process'));
6916
+ reject(new transport_errors_1$6.NotSupportedError('downloadRuntime only supported in an OpenFin Render process'));
6813
6917
  return;
6814
6918
  }
6815
6919
  const downloadId = this.wire.environment.getNextMessageId().toString();
@@ -6831,7 +6935,7 @@ class System extends base_1$i.EmitterBase {
6831
6935
  const dlError = (payload) => {
6832
6936
  cleanListeners();
6833
6937
  const { reason, err: error } = payload;
6834
- reject(new transport_errors_1$2.RuntimeError({ reason, error }, callsites));
6938
+ reject(new transport_errors_1$6.RuntimeError({ reason, error }, callsites));
6835
6939
  };
6836
6940
  const dlComplete = () => {
6837
6941
  cleanListeners();
@@ -7566,6 +7670,7 @@ var channel = {};
7566
7670
 
7567
7671
  Object.defineProperty(channel, "__esModule", { value: true });
7568
7672
  channel.ChannelBase = channel.ProtectedItems = void 0;
7673
+ const transport_errors_1$5 = transportErrors;
7569
7674
  const resultOrPayload = (func) => async (topic, payload, senderIdentity) => {
7570
7675
  const res = await func(topic, payload, senderIdentity);
7571
7676
  return res === undefined ? payload : res;
@@ -7598,6 +7703,7 @@ class ChannelBase {
7598
7703
  return this.postAction ? await this.postAction(topic, actionProcessed, senderIdentity) : actionProcessed;
7599
7704
  }
7600
7705
  catch (e) {
7706
+ transport_errors_1$5.RuntimeError.trimEndCallSites(e, /Channel.*processAction/);
7601
7707
  if (this.errorMiddleware) {
7602
7708
  return this.errorMiddleware(topic, e, senderIdentity);
7603
7709
  }
@@ -7899,6 +8005,25 @@ class ChannelBase {
7899
8005
  }
7900
8006
  channel.ChannelBase = ChannelBase;
7901
8007
 
8008
+ var channelError = {};
8009
+
8010
+ Object.defineProperty(channelError, "__esModule", { value: true });
8011
+ channelError.ChannelError = void 0;
8012
+ const transport_errors_1$4 = transportErrors;
8013
+ class ChannelError extends Error {
8014
+ constructor(originalError, action, dispatchPayload, callsites) {
8015
+ super(originalError.message);
8016
+ this.action = action;
8017
+ this.dispatchPayload = dispatchPayload;
8018
+ this.name = this.constructor.name;
8019
+ if ('cause' in originalError && originalError.cause instanceof Error) {
8020
+ this.cause = originalError.cause;
8021
+ }
8022
+ this.stack = transport_errors_1$4.RuntimeError.prepareStackTrace(this, callsites);
8023
+ }
8024
+ }
8025
+ channelError.ChannelError = ChannelError;
8026
+
7902
8027
  var __classPrivateFieldGet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
7903
8028
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
7904
8029
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
@@ -7913,7 +8038,9 @@ var __classPrivateFieldSet$a = (commonjsGlobal && commonjsGlobal.__classPrivateF
7913
8038
  var _ChannelClient_protectedObj, _ChannelClient_strategy, _ChannelClient_close;
7914
8039
  Object.defineProperty(client, "__esModule", { value: true });
7915
8040
  client.ChannelClient = void 0;
8041
+ const transport_errors_1$3 = transportErrors;
7916
8042
  const channel_1$1 = channel;
8043
+ const channel_error_1$1 = channelError;
7917
8044
  const channelClientsByEndpointId = new Map();
7918
8045
  /**
7919
8046
  * Instance created to enable use of a channel as a client. Allows for communication with the
@@ -8015,7 +8142,10 @@ class ChannelClient extends channel_1$1.ChannelBase {
8015
8142
  */
8016
8143
  async dispatch(action, payload) {
8017
8144
  if (__classPrivateFieldGet$c(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
8018
- return __classPrivateFieldGet$c(this, _ChannelClient_strategy, "f").send(this.providerIdentity.channelId, action, payload);
8145
+ const callSites = transport_errors_1$3.RuntimeError.getCallSite();
8146
+ return __classPrivateFieldGet$c(this, _ChannelClient_strategy, "f").send(this.providerIdentity.channelId, action, payload).catch((e) => {
8147
+ throw new channel_error_1$1.ChannelError(e, action, payload, callSites);
8148
+ });
8019
8149
  }
8020
8150
  throw new Error('The client you are trying to dispatch from is disconnected from the target provider.');
8021
8151
  }
@@ -8130,7 +8260,7 @@ class ClassicStrategy {
8130
8260
  _ClassicStrategy_endpointIdentityMap.set(this, new Map());
8131
8261
  // Store a set of cancellable promises to be able to reject them when client
8132
8262
  // connection problems occur
8133
- _ClassicStrategy_pendingMessagesByEndpointId.set(this, new Map);
8263
+ _ClassicStrategy_pendingMessagesByEndpointId.set(this, new Map());
8134
8264
  this.send = async (endpointId, action, payload) => {
8135
8265
  const to = __classPrivateFieldGet$b(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
8136
8266
  if (!to) {
@@ -8144,17 +8274,21 @@ class ClassicStrategy {
8144
8274
  }
8145
8275
  delete cleanId.isLocalEndpointId;
8146
8276
  // grab the promise before awaiting it to save in our pending messages map
8147
- const p = __classPrivateFieldGet$b(this, _ClassicStrategy_wire, "f")
8148
- .sendAction('send-channel-message', {
8277
+ const p = __classPrivateFieldGet$b(this, _ClassicStrategy_wire, "f").sendAction('send-channel-message', {
8149
8278
  ...cleanId,
8150
8279
  providerIdentity: this.providerIdentity,
8151
8280
  action,
8152
8281
  payload
8153
8282
  });
8154
8283
  __classPrivateFieldGet$b(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
8155
- const raw = await p.catch((error) => {
8284
+ const raw = await p
8285
+ .catch((error) => {
8286
+ if ('cause' in error) {
8287
+ throw error;
8288
+ }
8156
8289
  throw new Error(error.message);
8157
- }).finally(() => {
8290
+ })
8291
+ .finally(() => {
8158
8292
  // clean up the pending promise
8159
8293
  __classPrivateFieldGet$b(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
8160
8294
  });
@@ -8208,13 +8342,17 @@ var errors = {};
8208
8342
  Object.defineProperty(errors, "__esModule", { value: true });
8209
8343
  errors.errorToPOJO = void 0;
8210
8344
  function errorToPOJO(error) {
8211
- return {
8345
+ const errorObj = {
8212
8346
  stack: error.stack,
8213
8347
  name: error.name,
8214
8348
  message: error.message,
8215
8349
  // support the case where stack is empty or missing
8216
8350
  toString: () => error.stack || error.toString()
8217
8351
  };
8352
+ if ('cause' in error) {
8353
+ errorObj.cause = errorToPOJO(error.cause);
8354
+ }
8355
+ return errorObj;
8218
8356
  }
8219
8357
  errors.errorToPOJO = errorToPOJO;
8220
8358
 
@@ -8233,7 +8371,7 @@ var _RTCEndpoint_processAction, _RTCEndpoint_disconnectListener;
8233
8371
  Object.defineProperty(endpoint, "__esModule", { value: true });
8234
8372
  endpoint.RTCEndpoint = void 0;
8235
8373
  /* eslint-disable @typescript-eslint/no-unused-vars */
8236
- const errors_1$1 = errors;
8374
+ const errors_1$2 = errors;
8237
8375
  /*
8238
8376
  This handles sending RTC messages between RTC connections over the request and response data channels.
8239
8377
  */
@@ -8322,7 +8460,7 @@ class RTCEndpoint {
8322
8460
  if (this.rtc.channels.response.readyState === 'open') {
8323
8461
  this.rtc.channels.response.send(JSON.stringify({
8324
8462
  messageId,
8325
- error: (0, errors_1$1.errorToPOJO)(error),
8463
+ error: (0, errors_1$2.errorToPOJO)(error),
8326
8464
  success: false
8327
8465
  }));
8328
8466
  }
@@ -8638,8 +8776,10 @@ var __classPrivateFieldSet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateF
8638
8776
  var _ChannelProvider_connections, _ChannelProvider_protectedObj, _ChannelProvider_strategy, _ChannelProvider_removeEndpoint, _ChannelProvider_close;
8639
8777
  Object.defineProperty(provider, "__esModule", { value: true });
8640
8778
  provider.ChannelProvider = void 0;
8641
- const channel_1 = channel;
8779
+ const transport_errors_1$2 = transportErrors;
8642
8780
  const runtimeVersioning_1 = runtimeVersioning;
8781
+ const channel_1 = channel;
8782
+ const channel_error_1 = channelError;
8643
8783
  /**
8644
8784
  * Instance created to enable use of a channel as a provider. Allows for communication with the {@link ChannelClient ChannelClients} by invoking an action on
8645
8785
  * a single client via {@link ChannelProvider#dispatch dispatch} or all clients via {@link ChannelProvider#publish publish}
@@ -8756,7 +8896,10 @@ class ChannelProvider extends channel_1.ChannelBase {
8756
8896
  dispatch(to, action, payload) {
8757
8897
  const endpointId = to.endpointId ?? this.getEndpointIdForOpenFinId(to, action);
8758
8898
  if (endpointId && __classPrivateFieldGet$8(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
8759
- return __classPrivateFieldGet$8(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload);
8899
+ const callSites = transport_errors_1$2.RuntimeError.getCallSite();
8900
+ return __classPrivateFieldGet$8(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload).catch((e) => {
8901
+ throw new channel_error_1.ChannelError(e, action, payload, callSites);
8902
+ });
8760
8903
  }
8761
8904
  return Promise.reject(new Error(`Client connection with identity uuid: ${to.uuid} / name: ${to.name} / endpointId: ${endpointId} no longer connected.`));
8762
8905
  }
@@ -8969,6 +9112,7 @@ Object.defineProperty(messageReceiver$1, "__esModule", { value: true });
8969
9112
  messageReceiver$1.MessageReceiver = void 0;
8970
9113
  const client_1$1 = client;
8971
9114
  const base_1$g = base;
9115
+ const errors_1$1 = errors;
8972
9116
  /*
8973
9117
  This is a singleton (per fin object) tasked with routing messages coming off the ipc to the correct endpoint.
8974
9118
  It needs to be a singleton because there can only be one per wire. It tracks both clients and providers' processAction passed in via the strategy.
@@ -8997,6 +9141,7 @@ class MessageReceiver extends base_1$g.Base {
8997
9141
  if (!handler) {
8998
9142
  ackToSender.payload.success = false;
8999
9143
  ackToSender.payload.reason = `Client connection with identity uuid: ${this.wire.me.uuid} / name: ${this.wire.me.name} / endpointId: ${key} no longer connected.`;
9144
+ ackToSender.payload.error = (0, errors_1$1.errorToPOJO)(new Error(ackToSender.payload.reason));
9000
9145
  return this.wire.sendRaw(ackToSender);
9001
9146
  }
9002
9147
  try {
@@ -9008,6 +9153,7 @@ class MessageReceiver extends base_1$g.Base {
9008
9153
  catch (e) {
9009
9154
  ackToSender.payload.success = false;
9010
9155
  ackToSender.payload.reason = e.message;
9156
+ ackToSender.payload.error = (0, errors_1$1.errorToPOJO)(e);
9011
9157
  return this.wire.sendRaw(ackToSender);
9012
9158
  }
9013
9159
  }
@@ -17441,7 +17587,7 @@ class NodeEnvironment extends BaseEnvironment_1 {
17441
17587
  };
17442
17588
  }
17443
17589
  getAdapterVersionSync() {
17444
- return "40.82.3";
17590
+ return "40.82.4";
17445
17591
  }
17446
17592
  observeBounds(element, onChange) {
17447
17593
  throw new Error('Method not implemented.');
@@ -17772,7 +17918,10 @@ class Transport extends events_1$1.EventEmitter {
17772
17918
  }
17773
17919
  else {
17774
17920
  console.warn('Received invalid response from core', data);
17775
- handleNack({ reason: 'invalid response shape' });
17921
+ handleNack({
17922
+ reason: 'invalid response shape',
17923
+ error: (0, errors_1.errorToPOJO)(new Error('Invalid response shape'))
17924
+ });
17776
17925
  }
17777
17926
  }
17778
17927
  else if (!data.payload.success) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/node-adapter",
3
- "version": "40.82.3",
3
+ "version": "40.82.4",
4
4
  "description": "See README.md",
5
5
  "main": "out/node-adapter.js",
6
6
  "types": "out/node-adapter.d.ts",
@@ -23,7 +23,7 @@
23
23
  "author": "OpenFin",
24
24
  "dependencies": {
25
25
  "@types/node": "^20.14.2",
26
- "@openfin/core": "40.82.3",
26
+ "@openfin/core": "40.82.4",
27
27
  "lodash": "^4.17.21",
28
28
  "ws": "^7.3.0"
29
29
  }