forbidden (403) is a valid return status, don't log the whole exception in this case
This commit is contained in:
parent
835e70dbe2
commit
9d1d08bf9b
|
@ -150,10 +150,14 @@ class GetSharedSecret extends QueuedJob{
|
|||
|
||||
} catch (ClientException $e) {
|
||||
$status = $e->getCode();
|
||||
$this->logger->logException($e);
|
||||
if ($status === Http::STATUS_FORBIDDEN) {
|
||||
$this->logger->info($target . ' refused to exchange a shared secret with you.', ['app' => 'federation']);
|
||||
} else {
|
||||
$this->logger->logException($e, ['app' => 'federation']);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$status = HTTP::STATUS_INTERNAL_SERVER_ERROR;
|
||||
$this->logger->logException($e);
|
||||
$this->logger->logException($e, ['app' => 'federation']);
|
||||
}
|
||||
|
||||
// if we received a unexpected response we try again later
|
||||
|
|
|
@ -148,10 +148,14 @@ class RequestSharedSecret extends QueuedJob {
|
|||
|
||||
} catch (ClientException $e) {
|
||||
$status = $e->getCode();
|
||||
$this->logger->logException($e);
|
||||
if ($status === Http::STATUS_FORBIDDEN) {
|
||||
$this->logger->info($target . ' refused to ask for a shared secret.', ['app' => 'federation']);
|
||||
} else {
|
||||
$this->logger->logException($e, ['app' => 'federation']);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$status = HTTP::STATUS_INTERNAL_SERVER_ERROR;
|
||||
$this->logger->logException($e);
|
||||
$this->logger->logException($e, ['app' => 'federation']);
|
||||
}
|
||||
|
||||
// if we received a unexpected response we try again later
|
||||
|
|
Loading…
Reference in New Issue