Skip to content

Commit 76bd8ab

Browse files
committed
Update ErrorCodeModule docs with accurate translation examples and clarify message types
1 parent 162df08 commit 76bd8ab

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

migration-guides/11.8.x-to-11.9.x.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,15 @@ The new ErrorCodeModule provides a centralized system for error codes with inter
5454
{
5555
"errors": {
5656
"LTNS_0001": "Benutzer wurde nicht gefunden.",
57-
"LTNS_0002": "Das eingegebene Passwort ist ungültig."
57+
"LTNS_0002": "Das eingegebene Passwort ist ungültig.",
58+
"LTNS_0100": "Sie sind nicht angemeldet.",
59+
"LTNS_0101": "Zugriff verweigert - Unzureichende Berechtigungen."
5860
}
5961
}
6062
```
6163

64+
> **Note:** The translations returned by the i18n API are user-friendly messages intended for end users. They may differ from the technical error messages used in exceptions (e.g., `#LTNS_0100: Unauthorized - User is not logged in`).
65+
6266
#### Error Code Ranges
6367

6468
| Range | Category |

src/core/modules/error-code/INTEGRATION-CHECKLIST.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,15 @@ const orderCode = ProjectErrorCode.ORDER_NOT_FOUND; // '#PROJ_0001: Order not f
273273
```json
274274
{
275275
"errors": {
276-
"LTNS_0001": "Benutzer mit E-Mail {email} wurde nicht gefunden.",
276+
"LTNS_0001": "Benutzer wurde nicht gefunden.",
277+
"LTNS_0100": "Sie sind nicht angemeldet.",
277278
"PROJ_0001": "Bestellung mit ID {orderId} wurde nicht gefunden."
278279
}
279280
}
280281
```
281282

283+
> **Note:** Core LTNS_* translations are user-friendly messages without placeholders. Project-specific errors (PROJ_*) may include placeholders like `{orderId}` if defined in your `ProjectErrors` registry.
284+
282285
---
283286

284287
## Detailed Documentation

src/core/modules/error-code/core-error-code.controller.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ export class CoreErrorCodeController {
3333
* ```json
3434
* {
3535
* "errors": {
36-
* "LTNS_0001": "Benutzer mit E-Mail {email} wurde nicht gefunden.",
37-
* "LTNS_0002": "Das eingegebene Passwort ist ungültig."
36+
* "LTNS_0001": "Benutzer wurde nicht gefunden.",
37+
* "LTNS_0002": "Das eingegebene Passwort ist ungültig.",
38+
* "LTNS_0100": "Sie sind nicht angemeldet."
3839
* }
3940
* }
4041
* ```

0 commit comments

Comments
 (0)