Initial commit

This commit is contained in:
2026-05-25 08:22:12 +07:00
commit a152c99cce
154 changed files with 39033 additions and 0 deletions

21
dist/shared/errors/index.js vendored Normal file
View File

@ -0,0 +1,21 @@
export class ApiError extends Error {
statusCode;
code;
details;
constructor(code, message, statusCode = 400, details) {
super(message);
this.code = code;
this.statusCode = statusCode;
this.details = details;
Error.captureStackTrace(this, this.constructor);
}
}
export function errorEnvelope(error, requestId) {
return {
code: error.code,
message: error.message,
details: error.details,
request_id: requestId,
timestamp: new Date().toISOString()
};
}