<?php

namespace App\Core\Exceptions;

use Exception;
use Illuminate\Http\JsonResponse;

class NotFoundException extends ServiceException
{
    public function __construct(string $resource = 'Resource', mixed $identifier = null)
    {
        $message = $identifier
            ? "{$resource} with identifier '{$identifier}' not found"
            : "{$resource} not found";

        parent::__construct($message, 'NOT_FOUND', 404);
    }
}
