mirror of
https://github.com/nextcloud/spreed.git
synced 2025-08-16 15:27:59 +00:00
fix(setupchecks): Log the error from setupchecks to have more details
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
@ -17,6 +17,7 @@ use OCP\IURLGenerator;
|
||||
use OCP\SetupCheck\ISetupCheck;
|
||||
use OCP\SetupCheck\SetupResult;
|
||||
use OCP\Support\Subscription\IRegistry;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class HighPerformanceBackend implements ISetupCheck {
|
||||
public function __construct(
|
||||
@ -26,6 +27,7 @@ class HighPerformanceBackend implements ISetupCheck {
|
||||
protected readonly IL10N $l,
|
||||
protected readonly Manager $signalManager,
|
||||
protected readonly IRegistry $subscription,
|
||||
protected readonly LoggerInterface $logger,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -78,10 +80,11 @@ class HighPerformanceBackend implements ISetupCheck {
|
||||
$publicKey = $this->talkConfig->getSignalingTokenPublicKey();
|
||||
$publicKeyDerived = $this->talkConfig->deriveSignalingTokenPublicKey($privateKey, $alg);
|
||||
|
||||
if ($publicKey != $publicKeyDerived) {
|
||||
if ($publicKey !== $publicKeyDerived) {
|
||||
return SetupResult::error($this->l->t('The stored public key for used algorithm %1$s does not match the stored private key. Run %2$s to fix the issue.', [$alg, '`occ talk:signaling:verify-keys --update`']));
|
||||
}
|
||||
} catch (\Exception) {
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('An error occurred while verifying the public key of the signaling token', ['exception' => $e]);
|
||||
return SetupResult::error($this->l->t('High-performance backend not configured correctly. Run %s for details.', ['`occ talk:signaling:verify-keys`']));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user