mirror of
https://github.com/shlinkio/shlink.git
synced 2026-02-28 12:13:13 +08:00
Added middleware that mitigates big error traces being logged for those not using mercure
This commit is contained in:
@@ -7,7 +7,6 @@ namespace Shlinkio\Shlink\Rest\Exception;
|
||||
use Fig\Http\Message\StatusCodeInterface;
|
||||
use Mezzio\ProblemDetails\Exception\CommonProblemDetailsExceptionTrait;
|
||||
use Mezzio\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
|
||||
use Throwable;
|
||||
|
||||
class MercureException extends RuntimeException implements ProblemDetailsExceptionInterface
|
||||
{
|
||||
@@ -16,9 +15,9 @@ class MercureException extends RuntimeException implements ProblemDetailsExcepti
|
||||
private const TITLE = 'Mercure integration not configured';
|
||||
private const TYPE = 'MERCURE_NOT_CONFIGURED';
|
||||
|
||||
public static function mercureNotConfigured(?Throwable $prev = null): self
|
||||
public static function mercureNotConfigured(): self
|
||||
{
|
||||
$e = new self('This Shlink instance is not integrated with a mercure hub.', 1, $prev);
|
||||
$e = new self('This Shlink instance is not integrated with a mercure hub.');
|
||||
|
||||
$e->detail = $e->getMessage();
|
||||
$e->title = self::TITLE;
|
||||
|
||||
Reference in New Issue
Block a user