@bonsae/nrg-runtime 0.24.0 → 0.25.0

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/package.json +1 -1
  2. package/server/index.cjs +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonsae/nrg-runtime",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "description": "Runtime for Node-RED nodes built with @bonsae/nrg — no build tooling.",
5
5
  "author": "Allan Oricil <allanoricil@duck.com>",
6
6
  "license": "MIT",
package/server/index.cjs CHANGED
@@ -591,9 +591,12 @@ var IONode = class extends Node {
591
591
  nodeRedNode.log("Input processed");
592
592
  } catch (error) {
593
593
  const errorMsg = error instanceof Error ? error.message : "Unknown error during input handling";
594
+ const errorData = error && typeof error === "object" ? { ...error } : {};
594
595
  this.#sendToPort("error", {
595
596
  ...msg,
596
597
  error: {
598
+ ...errorData,
599
+ name: error?.name ?? "Error",
597
600
  message: errorMsg,
598
601
  source: this.#nodeSource()
599
602
  },