fedi-feed-router/backend/app/Exceptions/RoutingMismatchException.php

23 lines
576 B
PHP
Raw Permalink Normal View History

2025-07-05 18:26:04 +02:00
<?php
namespace App\Exceptions;
use App\Models\Feed;
use App\Models\PlatformChannel;
class RoutingMismatchException extends RoutingException
{
public function __construct(Feed $feed, PlatformChannel $channel)
{
$message = sprintf(
"Language mismatch: Feed '%s' is in '%s' but channel '%s' is set to '%s'. Feed and channel languages must match for proper content routing.",
$feed->name,
$feed->language,
$channel->name,
$channel->language
);
parent::__construct($message);
}
}