feat: internationalize API error responses by locale

Add shared error codes with zh/en/ms messages, coded app exceptions,
and locale-aware global filter. Frontends send X-Locale so error text
matches the active UI language.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-10 13:36:38 +08:00
parent 03f54ca689
commit 641c92a5f5
23 changed files with 1059 additions and 234 deletions

View File

@@ -126,4 +126,8 @@ export interface ApiResponse<T = unknown> {
data?: T;
message?: string;
error?: string;
code?: string;
params?: Record<string, string | number> | null;
}
export * from './api-errors';