import { HttpException } from '@nestjs/common'; export class HuntingDomainError extends HttpException { constructor( public readonly code: string, status: number, message: string, ) { super({ statusCode: status, code, message }, status); } } export function huntingNotAvailable(): HuntingDomainError { return new HuntingDomainError( 'HUNTING_NOT_AVAILABLE', 400, 'Hunting is not available at the current location.', ); } export function characterTravelling(): HuntingDomainError { return new HuntingDomainError( 'CHARACTER_TRAVELLING', 409, 'The character cannot hunt while travelling.', ); } export function noHuntEncountersAvailable(): HuntingDomainError { return new HuntingDomainError( 'NO_HUNT_ENCOUNTERS_AVAILABLE', 409, 'No encounters are currently available at this location.', ); } export { characterNotFound } from '../travel/travel.errors';