@venizia/ignis-atlas 0.1.2-0 → 0.1.2-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.
- package/dist/corpus/changelogs/2026-10-11-error-message-placeholders.md +1 -1
- package/dist/corpus/changelogs/2026-10-14-error-filled-text.md +38 -0
- package/dist/corpus/changelogs/index.md +1 -0
- package/dist/corpus/releases.json +61 -0
- package/dist/corpus/symbols.json +61 -21
- package/dist/corpus/wiki/extensions/helpers/error/index.md +29 -0
- package/package.json +2 -2
|
@@ -51,6 +51,6 @@ A route error inside a Worker host goes through the same middleware, so it answe
|
|
|
51
51
|
|
|
52
52
|
The fill runs in the response only. Filling `Error.message` too would print each value inline in the log line, outside the redacted `args` map.
|
|
53
53
|
|
|
54
|
-
**Files:** [`packages/kernel/src/base/middlewares/app-error/app-error.middleware.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/kernel/src/base/middlewares/app-error/app-error.middleware.ts), [`packages/
|
|
54
|
+
**Files:** [`packages/kernel/src/base/middlewares/app-error/app-error.middleware.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/kernel/src/base/middlewares/app-error/app-error.middleware.ts), [`packages/inversion/src/modules/error/message-template.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/inversion/src/modules/error/message-template.ts)
|
|
55
55
|
|
|
56
56
|
See [Read the error response shape](/extensions/helpers/error/#read-the-error-response-shape) for the full response.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: An Error Hands Out Its Filled Text
|
|
3
|
+
description: "ApplicationError.toFilledText() fills the args into the message template, for a reader that only knows .message - a queue's failure reason, a third-party log. message itself stays the template."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Changelog - 2026-10-14
|
|
7
|
+
|
|
8
|
+
## An error hands out its filled text
|
|
9
|
+
|
|
10
|
+
<Badge type="tip" text="Enhancement" />
|
|
11
|
+
|
|
12
|
+
**In one line.** `error.toFilledText()` gives the sentence a person reads; `error.message` stays the template.
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
const error = getError({
|
|
16
|
+
message: { text: 'Only %{available} left of %{sku}.', code: 'stock.unavailable' },
|
|
17
|
+
messageArgs: { available: 2, sku: 'TRA-01' },
|
|
18
|
+
statusCode: 409,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
error.toFilledText(); // 'Only 2 left of TRA-01.'
|
|
22
|
+
error.message; // 'Only %{available} left of %{sku}.'
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## What changed
|
|
26
|
+
|
|
27
|
+
The error response already filled its `message` (2026-10-11). A reader outside the response did not get that: a BullMQ job stores `job.failedReason = error.message`, so its dashboard showed `%{available}`.
|
|
28
|
+
|
|
29
|
+
- **`toFilledText()`** on `ApplicationError` fills each `%{key}` from `normalized.args`. A key with no arg stays as written.
|
|
30
|
+
- **`MessageTemplate.render({ text, args })`** is the fill itself, exported from `@venizia/ignis-inversion` and `@venizia/ignis-helpers`. It also returns the keys it found no arg for. The error middleware uses it, so the response and `toFilledText()` fill the same way.
|
|
31
|
+
- **`message` does not change.** A filled `message` would print every arg value in each log line and error tracker, outside the `args` map the log redacts by key. Fill where you choose to store the text.
|
|
32
|
+
|
|
33
|
+
## Who is affected
|
|
34
|
+
|
|
35
|
+
- **A queue, tracker or log that stores `error.message`.** Call `toFilledText()` where you hand the error over - see [Store the filled text](/extensions/helpers/error/#store-the-filled-text-where-a-plain-reader-shows-it).
|
|
36
|
+
- **Everyone else.** No change.
|
|
37
|
+
|
|
38
|
+
**Files:** [`packages/inversion/src/modules/error/message-template.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/inversion/src/modules/error/message-template.ts), [`packages/inversion/src/modules/error/app-error.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/inversion/src/modules/error/app-error.ts), [`packages/kernel/src/base/middlewares/app-error/app-error.middleware.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/kernel/src/base/middlewares/app-error/app-error.middleware.ts)
|
|
@@ -17,6 +17,7 @@ This section tracks the history of significant changes, refactors, and updates t
|
|
|
17
17
|
|
|
18
18
|
| Date | Title | Type |
|
|
19
19
|
|------|-------|------|
|
|
20
|
+
| 2026-10-14 | [An Error Hands Out Its Filled Text](./2026-10-14-error-filled-text) | Enhancement |
|
|
20
21
|
| 2026-10-14 | [TemporalHelper Runs in Every Browser and Speaks a Locale](./2026-10-14-temporal-browser-and-locale) | Feature |
|
|
21
22
|
| 2026-10-11 | [Error Messages Fill Their Placeholders](./2026-10-11-error-message-placeholders) | Enhancement, Behavior Change |
|
|
22
23
|
| 2026-10-09 | [Const Values Stay Literal](./2026-10-09-const-value-literals) | Bug Fix, Breaking Change |
|
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
],
|
|
14
14
|
"releases": {
|
|
15
15
|
"atlas": [
|
|
16
|
+
{
|
|
17
|
+
"version": "0.1.2-0",
|
|
18
|
+
"date": "2026-10-14",
|
|
19
|
+
"sha": "7a13b114",
|
|
20
|
+
"order": 1625
|
|
21
|
+
},
|
|
16
22
|
{
|
|
17
23
|
"version": "0.1.1",
|
|
18
24
|
"date": "2026-10-12",
|
|
@@ -815,6 +821,12 @@
|
|
|
815
821
|
}
|
|
816
822
|
],
|
|
817
823
|
"connectors": [
|
|
824
|
+
{
|
|
825
|
+
"version": "0.2.2-1",
|
|
826
|
+
"date": "2026-10-14",
|
|
827
|
+
"sha": "a0960da2",
|
|
828
|
+
"order": 1631
|
|
829
|
+
},
|
|
818
830
|
{
|
|
819
831
|
"version": "0.2.2-0",
|
|
820
832
|
"date": "2026-10-14",
|
|
@@ -2013,6 +2025,12 @@
|
|
|
2013
2025
|
}
|
|
2014
2026
|
],
|
|
2015
2027
|
"core-server": [
|
|
2028
|
+
{
|
|
2029
|
+
"version": "0.2.2-1",
|
|
2030
|
+
"date": "2026-10-14",
|
|
2031
|
+
"sha": "88b2fe0d",
|
|
2032
|
+
"order": 1633
|
|
2033
|
+
},
|
|
2016
2034
|
{
|
|
2017
2035
|
"version": "0.2.2-0",
|
|
2018
2036
|
"date": "2026-10-14",
|
|
@@ -2387,6 +2405,12 @@
|
|
|
2387
2405
|
}
|
|
2388
2406
|
],
|
|
2389
2407
|
"core-worker": [
|
|
2408
|
+
{
|
|
2409
|
+
"version": "0.2.2-1",
|
|
2410
|
+
"date": "2026-10-14",
|
|
2411
|
+
"sha": "5c81ac61",
|
|
2412
|
+
"order": 1632
|
|
2413
|
+
},
|
|
2390
2414
|
{
|
|
2391
2415
|
"version": "0.2.2-0",
|
|
2392
2416
|
"date": "2026-10-14",
|
|
@@ -3127,6 +3151,12 @@
|
|
|
3127
3151
|
}
|
|
3128
3152
|
],
|
|
3129
3153
|
"filter": [
|
|
3154
|
+
{
|
|
3155
|
+
"version": "0.2.2-0",
|
|
3156
|
+
"date": "2026-10-14",
|
|
3157
|
+
"sha": "10de4309",
|
|
3158
|
+
"order": 1628
|
|
3159
|
+
},
|
|
3130
3160
|
{
|
|
3131
3161
|
"version": "0.2.1",
|
|
3132
3162
|
"date": "2026-10-12",
|
|
@@ -3321,6 +3351,12 @@
|
|
|
3321
3351
|
}
|
|
3322
3352
|
],
|
|
3323
3353
|
"helpers": [
|
|
3354
|
+
{
|
|
3355
|
+
"version": "0.2.2-1",
|
|
3356
|
+
"date": "2026-10-14",
|
|
3357
|
+
"sha": "7d9c118b",
|
|
3358
|
+
"order": 1629
|
|
3359
|
+
},
|
|
3324
3360
|
{
|
|
3325
3361
|
"version": "0.2.2-0",
|
|
3326
3362
|
"date": "2026-10-14",
|
|
@@ -4073,6 +4109,12 @@
|
|
|
4073
4109
|
}
|
|
4074
4110
|
],
|
|
4075
4111
|
"inversion": [
|
|
4112
|
+
{
|
|
4113
|
+
"version": "0.2.2-0",
|
|
4114
|
+
"date": "2026-10-14",
|
|
4115
|
+
"sha": "b079323a",
|
|
4116
|
+
"order": 1627
|
|
4117
|
+
},
|
|
4076
4118
|
{
|
|
4077
4119
|
"version": "0.2.1",
|
|
4078
4120
|
"date": "2026-10-12",
|
|
@@ -4423,6 +4465,12 @@
|
|
|
4423
4465
|
}
|
|
4424
4466
|
],
|
|
4425
4467
|
"kernel": [
|
|
4468
|
+
{
|
|
4469
|
+
"version": "0.2.2-1",
|
|
4470
|
+
"date": "2026-10-14",
|
|
4471
|
+
"sha": "e9a0a0a6",
|
|
4472
|
+
"order": 1630
|
|
4473
|
+
},
|
|
4426
4474
|
{
|
|
4427
4475
|
"version": "0.2.2-0",
|
|
4428
4476
|
"date": "2026-10-14",
|
|
@@ -4785,12 +4833,25 @@
|
|
|
4785
4833
|
"kind": "Feature",
|
|
4786
4834
|
"order": 1618
|
|
4787
4835
|
},
|
|
4836
|
+
{
|
|
4837
|
+
"id": "changelog:2026-10-14-error-filled-text",
|
|
4838
|
+
"file": "2026-10-14-error-filled-text.md",
|
|
4839
|
+
"date": "2026-10-14",
|
|
4840
|
+
"title": "An Error Hands Out Its Filled Text",
|
|
4841
|
+
"packages": [
|
|
4842
|
+
"helpers",
|
|
4843
|
+
"inversion"
|
|
4844
|
+
],
|
|
4845
|
+
"kind": "Enhancement",
|
|
4846
|
+
"order": 1626
|
|
4847
|
+
},
|
|
4788
4848
|
{
|
|
4789
4849
|
"id": "changelog:2026-10-11-error-message-placeholders",
|
|
4790
4850
|
"file": "2026-10-11-error-message-placeholders.md",
|
|
4791
4851
|
"date": "2026-10-11",
|
|
4792
4852
|
"title": "Error Messages Fill Their Placeholders",
|
|
4793
4853
|
"packages": [
|
|
4854
|
+
"inversion",
|
|
4794
4855
|
"kernel"
|
|
4795
4856
|
],
|
|
4796
4857
|
"kind": "Enhancement",
|
package/dist/corpus/symbols.json
CHANGED
|
@@ -329,7 +329,7 @@
|
|
|
329
329
|
"specifier": "@venizia/ignis",
|
|
330
330
|
"kind": "class",
|
|
331
331
|
"file": "packages/inversion/src/modules/error/app-error.ts",
|
|
332
|
-
"line":
|
|
332
|
+
"line": 21,
|
|
333
333
|
"signature": "class ApplicationError extends Error"
|
|
334
334
|
},
|
|
335
335
|
{
|
|
@@ -629,7 +629,7 @@
|
|
|
629
629
|
"specifier": "@venizia/ignis",
|
|
630
630
|
"kind": "class",
|
|
631
631
|
"file": "packages/kernel/src/base/middlewares/app-error/app-error.middleware.ts",
|
|
632
|
-
"line":
|
|
632
|
+
"line": 93,
|
|
633
633
|
"signature": "class BaseAppErrorMiddleware extends BaseHelper implements IProvider<ErrorHandler>"
|
|
634
634
|
},
|
|
635
635
|
{
|
|
@@ -4634,6 +4634,16 @@
|
|
|
4634
4634
|
"line": 6,
|
|
4635
4635
|
"signature": "class MessageCode"
|
|
4636
4636
|
},
|
|
4637
|
+
{
|
|
4638
|
+
"name": "MessageTemplate",
|
|
4639
|
+
"package": "@venizia/ignis",
|
|
4640
|
+
"subpath": ".",
|
|
4641
|
+
"specifier": "@venizia/ignis",
|
|
4642
|
+
"kind": "class",
|
|
4643
|
+
"file": "packages/inversion/src/modules/error/message-template.ts",
|
|
4644
|
+
"line": 9,
|
|
4645
|
+
"signature": "class MessageTemplate"
|
|
4646
|
+
},
|
|
4637
4647
|
{
|
|
4638
4648
|
"name": "MetadataKeys",
|
|
4639
4649
|
"package": "@venizia/ignis",
|
|
@@ -6502,7 +6512,7 @@
|
|
|
6502
6512
|
"specifier": "@venizia/ignis",
|
|
6503
6513
|
"kind": "type",
|
|
6504
6514
|
"file": "packages/kernel/src/base/middlewares/app-error/app-error.middleware.ts",
|
|
6505
|
-
"line":
|
|
6515
|
+
"line": 31,
|
|
6506
6516
|
"signature": "type TErrorLogFormatter = (opts: { error: unknown; messageCode?: string; extra?: Record<string, unknown>; includeStack?: boolean; maxStackFrames?: number; }) => string"
|
|
6507
6517
|
},
|
|
6508
6518
|
{
|
|
@@ -9182,7 +9192,7 @@
|
|
|
9182
9192
|
"specifier": "@venizia/ignis",
|
|
9183
9193
|
"kind": "const",
|
|
9184
9194
|
"file": "packages/inversion/src/modules/error/app-error.ts",
|
|
9185
|
-
"line":
|
|
9195
|
+
"line": 101,
|
|
9186
9196
|
"signature": "fromError: (opts: { error: TResponsedError; }) => ApplicationError"
|
|
9187
9197
|
},
|
|
9188
9198
|
{
|
|
@@ -9282,7 +9292,7 @@
|
|
|
9282
9292
|
"specifier": "@venizia/ignis",
|
|
9283
9293
|
"kind": "const",
|
|
9284
9294
|
"file": "packages/inversion/src/modules/error/app-error.ts",
|
|
9285
|
-
"line":
|
|
9295
|
+
"line": 99,
|
|
9286
9296
|
"signature": "getError: (opts: TError) => ApplicationError"
|
|
9287
9297
|
},
|
|
9288
9298
|
{
|
|
@@ -9412,7 +9422,7 @@
|
|
|
9412
9422
|
"specifier": "@venizia/ignis",
|
|
9413
9423
|
"kind": "const",
|
|
9414
9424
|
"file": "packages/inversion/src/modules/error/app-error.ts",
|
|
9415
|
-
"line":
|
|
9425
|
+
"line": 104,
|
|
9416
9426
|
"signature": "isApplicationError: (error: unknown) => error is ApplicationError"
|
|
9417
9427
|
},
|
|
9418
9428
|
{
|
|
@@ -22120,7 +22130,7 @@
|
|
|
22120
22130
|
"specifier": "@venizia/ignis-helpers",
|
|
22121
22131
|
"kind": "class",
|
|
22122
22132
|
"file": "packages/inversion/src/modules/error/app-error.ts",
|
|
22123
|
-
"line":
|
|
22133
|
+
"line": 21,
|
|
22124
22134
|
"signature": "class ApplicationError extends Error"
|
|
22125
22135
|
},
|
|
22126
22136
|
{
|
|
@@ -23995,6 +24005,16 @@
|
|
|
23995
24005
|
"line": 6,
|
|
23996
24006
|
"signature": "class MessageCode"
|
|
23997
24007
|
},
|
|
24008
|
+
{
|
|
24009
|
+
"name": "MessageTemplate",
|
|
24010
|
+
"package": "@venizia/ignis-helpers",
|
|
24011
|
+
"subpath": ".",
|
|
24012
|
+
"specifier": "@venizia/ignis-helpers",
|
|
24013
|
+
"kind": "class",
|
|
24014
|
+
"file": "packages/inversion/src/modules/error/message-template.ts",
|
|
24015
|
+
"line": 9,
|
|
24016
|
+
"signature": "class MessageTemplate"
|
|
24017
|
+
},
|
|
23998
24018
|
{
|
|
23999
24019
|
"name": "MimeTypes",
|
|
24000
24020
|
"package": "@venizia/ignis-helpers",
|
|
@@ -25743,7 +25763,7 @@
|
|
|
25743
25763
|
"specifier": "@venizia/ignis-helpers",
|
|
25744
25764
|
"kind": "const",
|
|
25745
25765
|
"file": "packages/inversion/src/modules/error/app-error.ts",
|
|
25746
|
-
"line":
|
|
25766
|
+
"line": 101,
|
|
25747
25767
|
"signature": "fromError: (opts: { error: TResponsedError; }) => ApplicationError"
|
|
25748
25768
|
},
|
|
25749
25769
|
{
|
|
@@ -25763,7 +25783,7 @@
|
|
|
25763
25783
|
"specifier": "@venizia/ignis-helpers",
|
|
25764
25784
|
"kind": "const",
|
|
25765
25785
|
"file": "packages/inversion/src/modules/error/app-error.ts",
|
|
25766
|
-
"line":
|
|
25786
|
+
"line": 99,
|
|
25767
25787
|
"signature": "getError: (opts: TError) => ApplicationError"
|
|
25768
25788
|
},
|
|
25769
25789
|
{
|
|
@@ -25833,7 +25853,7 @@
|
|
|
25833
25853
|
"specifier": "@venizia/ignis-helpers",
|
|
25834
25854
|
"kind": "const",
|
|
25835
25855
|
"file": "packages/inversion/src/modules/error/app-error.ts",
|
|
25836
|
-
"line":
|
|
25856
|
+
"line": 104,
|
|
25837
25857
|
"signature": "isApplicationError: (error: unknown) => error is ApplicationError"
|
|
25838
25858
|
},
|
|
25839
25859
|
{
|
|
@@ -26933,7 +26953,7 @@
|
|
|
26933
26953
|
"specifier": "@venizia/ignis-helpers/core",
|
|
26934
26954
|
"kind": "class",
|
|
26935
26955
|
"file": "packages/inversion/src/modules/error/app-error.ts",
|
|
26936
|
-
"line":
|
|
26956
|
+
"line": 21,
|
|
26937
26957
|
"signature": "class ApplicationError extends Error"
|
|
26938
26958
|
},
|
|
26939
26959
|
{
|
|
@@ -27556,6 +27576,16 @@
|
|
|
27556
27576
|
"line": 6,
|
|
27557
27577
|
"signature": "class MessageCode"
|
|
27558
27578
|
},
|
|
27579
|
+
{
|
|
27580
|
+
"name": "MessageTemplate",
|
|
27581
|
+
"package": "@venizia/ignis-helpers",
|
|
27582
|
+
"subpath": "./core",
|
|
27583
|
+
"specifier": "@venizia/ignis-helpers/core",
|
|
27584
|
+
"kind": "class",
|
|
27585
|
+
"file": "packages/inversion/src/modules/error/message-template.ts",
|
|
27586
|
+
"line": 9,
|
|
27587
|
+
"signature": "class MessageTemplate"
|
|
27588
|
+
},
|
|
27559
27589
|
{
|
|
27560
27590
|
"name": "NativeTemporalAdapter",
|
|
27561
27591
|
"package": "@venizia/ignis-helpers",
|
|
@@ -28153,7 +28183,7 @@
|
|
|
28153
28183
|
"specifier": "@venizia/ignis-helpers/core",
|
|
28154
28184
|
"kind": "const",
|
|
28155
28185
|
"file": "packages/inversion/src/modules/error/app-error.ts",
|
|
28156
|
-
"line":
|
|
28186
|
+
"line": 101,
|
|
28157
28187
|
"signature": "fromError: (opts: { error: TResponsedError; }) => ApplicationError"
|
|
28158
28188
|
},
|
|
28159
28189
|
{
|
|
@@ -28163,7 +28193,7 @@
|
|
|
28163
28193
|
"specifier": "@venizia/ignis-helpers/core",
|
|
28164
28194
|
"kind": "const",
|
|
28165
28195
|
"file": "packages/inversion/src/modules/error/app-error.ts",
|
|
28166
|
-
"line":
|
|
28196
|
+
"line": 99,
|
|
28167
28197
|
"signature": "getError: (opts: TError) => ApplicationError"
|
|
28168
28198
|
},
|
|
28169
28199
|
{
|
|
@@ -28183,7 +28213,7 @@
|
|
|
28183
28213
|
"specifier": "@venizia/ignis-helpers/core",
|
|
28184
28214
|
"kind": "const",
|
|
28185
28215
|
"file": "packages/inversion/src/modules/error/app-error.ts",
|
|
28186
|
-
"line":
|
|
28216
|
+
"line": 104,
|
|
28187
28217
|
"signature": "isApplicationError: (error: unknown) => error is ApplicationError"
|
|
28188
28218
|
},
|
|
28189
28219
|
{
|
|
@@ -29603,7 +29633,7 @@
|
|
|
29603
29633
|
"specifier": "@venizia/ignis-inversion",
|
|
29604
29634
|
"kind": "class",
|
|
29605
29635
|
"file": "packages/inversion/src/modules/error/app-error.ts",
|
|
29606
|
-
"line":
|
|
29636
|
+
"line": 21,
|
|
29607
29637
|
"signature": "class ApplicationError extends Error"
|
|
29608
29638
|
},
|
|
29609
29639
|
{
|
|
@@ -29786,6 +29816,16 @@
|
|
|
29786
29816
|
"line": 6,
|
|
29787
29817
|
"signature": "class MessageCode"
|
|
29788
29818
|
},
|
|
29819
|
+
{
|
|
29820
|
+
"name": "MessageTemplate",
|
|
29821
|
+
"package": "@venizia/ignis-inversion",
|
|
29822
|
+
"subpath": ".",
|
|
29823
|
+
"specifier": "@venizia/ignis-inversion",
|
|
29824
|
+
"kind": "class",
|
|
29825
|
+
"file": "packages/inversion/src/modules/error/message-template.ts",
|
|
29826
|
+
"line": 9,
|
|
29827
|
+
"signature": "class MessageTemplate"
|
|
29828
|
+
},
|
|
29789
29829
|
{
|
|
29790
29830
|
"name": "MetadataKeys",
|
|
29791
29831
|
"package": "@venizia/ignis-inversion",
|
|
@@ -29823,7 +29863,7 @@
|
|
|
29823
29863
|
"specifier": "@venizia/ignis-inversion",
|
|
29824
29864
|
"kind": "type",
|
|
29825
29865
|
"file": "packages/inversion/src/modules/error/app-error.ts",
|
|
29826
|
-
"line":
|
|
29866
|
+
"line": 108,
|
|
29827
29867
|
"signature": "type TApplicationError = ApplicationError"
|
|
29828
29868
|
},
|
|
29829
29869
|
{
|
|
@@ -30153,7 +30193,7 @@
|
|
|
30153
30193
|
"specifier": "@venizia/ignis-inversion",
|
|
30154
30194
|
"kind": "const",
|
|
30155
30195
|
"file": "packages/inversion/src/modules/error/app-error.ts",
|
|
30156
|
-
"line":
|
|
30196
|
+
"line": 101,
|
|
30157
30197
|
"signature": "fromError: (opts: { error: TResponsedError; }) => ApplicationError"
|
|
30158
30198
|
},
|
|
30159
30199
|
{
|
|
@@ -30163,7 +30203,7 @@
|
|
|
30163
30203
|
"specifier": "@venizia/ignis-inversion",
|
|
30164
30204
|
"kind": "const",
|
|
30165
30205
|
"file": "packages/inversion/src/modules/error/app-error.ts",
|
|
30166
|
-
"line":
|
|
30206
|
+
"line": 99,
|
|
30167
30207
|
"signature": "getError: (opts: TError) => ApplicationError"
|
|
30168
30208
|
},
|
|
30169
30209
|
{
|
|
@@ -30183,7 +30223,7 @@
|
|
|
30183
30223
|
"specifier": "@venizia/ignis-inversion",
|
|
30184
30224
|
"kind": "const",
|
|
30185
30225
|
"file": "packages/inversion/src/modules/error/app-error.ts",
|
|
30186
|
-
"line":
|
|
30226
|
+
"line": 104,
|
|
30187
30227
|
"signature": "isApplicationError: (error: unknown) => error is ApplicationError"
|
|
30188
30228
|
},
|
|
30189
30229
|
{
|
|
@@ -30613,7 +30653,7 @@
|
|
|
30613
30653
|
"specifier": "@venizia/ignis-kernel",
|
|
30614
30654
|
"kind": "class",
|
|
30615
30655
|
"file": "packages/kernel/src/base/middlewares/app-error/app-error.middleware.ts",
|
|
30616
|
-
"line":
|
|
30656
|
+
"line": 93,
|
|
30617
30657
|
"signature": "class BaseAppErrorMiddleware extends BaseHelper implements IProvider<ErrorHandler>"
|
|
30618
30658
|
},
|
|
30619
30659
|
{
|
|
@@ -32963,7 +33003,7 @@
|
|
|
32963
33003
|
"specifier": "@venizia/ignis-kernel",
|
|
32964
33004
|
"kind": "type",
|
|
32965
33005
|
"file": "packages/kernel/src/base/middlewares/app-error/app-error.middleware.ts",
|
|
32966
|
-
"line":
|
|
33006
|
+
"line": 31,
|
|
32967
33007
|
"signature": "type TErrorLogFormatter = (opts: { error: unknown; messageCode?: string; extra?: Record<string, unknown>; includeStack?: boolean; maxStackFrames?: number; }) => string"
|
|
32968
33008
|
},
|
|
32969
33009
|
{
|
|
@@ -304,6 +304,35 @@ The handler is fail-closed on environment. It exposes `stack` and `cause` in `de
|
|
|
304
304
|
>
|
|
305
305
|
> A key with no arg stays as written. Outside production, the middleware logs one warning naming the code and the missing keys. `Error.message` and the log line keep the template, so an arg value never leaves the redacted `args` map.
|
|
306
306
|
|
|
307
|
+
### Store the filled text where a plain reader shows it
|
|
308
|
+
|
|
309
|
+
`error.message` stays the template, so a reader that only knows `.message` - a job queue's failure reason, a third-party log - shows `%{key}`. Fill it where you hand the error over:
|
|
310
|
+
|
|
311
|
+
```typescript
|
|
312
|
+
const error = getError({
|
|
313
|
+
message: { text: 'Only %{available} left of %{sku}.', code: 'stock.unavailable' },
|
|
314
|
+
messageArgs: { available: 2, sku: 'TRA-01' },
|
|
315
|
+
statusCode: 409,
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
error.toFilledText(); // 'Only 2 left of TRA-01.'
|
|
319
|
+
error.message; // 'Only %{available} left of %{sku}.' - unchanged
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
For a BullMQ processor, which stores `job.failedReason = error.message`:
|
|
323
|
+
|
|
324
|
+
```typescript
|
|
325
|
+
const processor = async (job: Job) => {
|
|
326
|
+
try {
|
|
327
|
+
return await handle(job);
|
|
328
|
+
} catch (error) {
|
|
329
|
+
throw isApplicationError(error) ? new Error(error.toFilledText(), { cause: error }) : error;
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
Fill only where you choose to. A filled text carries every arg value inline, outside the `args` map a log redacts by key. `MessageTemplate.render({ text, args })` is the same fill, and also returns the keys it found no arg for.
|
|
335
|
+
|
|
307
336
|
### Consume the error response from a browser client
|
|
308
337
|
|
|
309
338
|
The error layer lives in `@venizia/ignis-inversion`, not in helpers, precisely so a browser app can
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venizia/ignis-atlas",
|
|
3
|
-
"version": "0.1.2-
|
|
3
|
+
"version": "0.1.2-1",
|
|
4
4
|
"description": "MCP server for IGNIS: search and read the wiki, changelogs and knowledge bundle by section, with citations. Bun-only, zero-dependency transport.",
|
|
5
5
|
"homepage": "https://ignis.venizia.ai",
|
|
6
6
|
"repository": {
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@hono/zod-openapi": "^1.6.3",
|
|
63
|
-
"@venizia/ignis-helpers": "^0.2.2-
|
|
63
|
+
"@venizia/ignis-helpers": "^0.2.2-1",
|
|
64
64
|
"zod": "^4.5.4"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|