learning_ai_common_plat/packages/errors/src/service-error.ts
saravanakumardb1 90b9cf93d8 fix(common): configure ESLint 9 and fix lint issues
- Added @eslint/js dependency
- Updated eslint.config.js for ESLint 9 compatibility
- Added required globals (crypto, localStorage, React, etc.)
- Fixed unused imports and variables
- Disabled sort-imports temporarily
- Formatted all files with Prettier
2026-02-12 16:37:30 -08:00

15 lines
324 B
TypeScript

/**
* Base error class for typed HTTP service errors.
* All specific error types extend this class.
*/
export class ServiceError extends Error {
constructor(
public statusCode: number,
message: string,
public details?: Record<string, unknown>
) {
super(message);
this.name = 'ServiceError';
}
}