private function logError(Throwable $throwable, ?string $message = null, array $context = []): void
    {
        $context['error'] = $throwable;

        $this->logger->critical($message ?? $throwable->getMessage(), $context);
    }