/**
 * External Service Error Catalog
 *
 * Defines all external service related errors.
 */

import { ErrorCategory, ErrorEntry } from './types';

export const EXTERNAL_ERRORS: Record<string, ErrorEntry> = {
	CIRCUIT_BREAKER_OPEN: {
		code: 'CIRCUIT_BREAKER_OPEN',
		httpStatus: 503,
		category: ErrorCategory.EXTERNAL,
		severity: 'critical',
		logToSentry: true,
		message: {
			vi: 'Dịch vụ không khả dụng',
			en: 'Service unavailable',
		},
	},
	EXTERNAL_SERVICE_ERROR: {
		code: 'EXTERNAL_SERVICE_ERROR',
		httpStatus: 502,
		category: ErrorCategory.EXTERNAL,
		severity: 'critical',
		logToSentry: true,
		message: {
			vi: 'Lỗi dịch vụ bên ngoài',
			en: 'External service error',
		},
	},
};
