diff --git a/package.json b/package.json index 1b0a404..2b115e7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@xkcm/better-errors", - "version": "1.1.0", + "version": "1.1.1", "description": "Better errors with TypeScript", "author": "xkcm", "license": "ISC", diff --git a/src/core/BetterError.class.ts b/src/core/BetterError.class.ts index b080a0b..ce61e0c 100644 --- a/src/core/BetterError.class.ts +++ b/src/core/BetterError.class.ts @@ -83,7 +83,7 @@ export default class BetterError< /%\{(.+?)\}/g, (placeholder: string) => { const dataPath = placeholder.slice(2, -1); - const targetObject = objectUtils.pick(this, ["code", "metadata"]); + const targetObject = objectUtils.pick(this, ["code", "metadata", "cause"]); const value = objectUtils.get(targetObject, dataPath); return String(value);