diff options
author | Joas Schilling <coding@schilljs.com> | 2022-06-07 22:00:26 +0200 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2022-06-08 09:20:16 +0000 |
commit | c6bb631e2f4cee72745ae1def6f9b965cf160859 (patch) | |
tree | 1b214e63078d969115d1a7bf0fe75f8870a1617e | |
parent | 84eee97e37a1863a5cc04816f87af7d7dbfa85c9 (diff) | |
download | nextcloud-server-c6bb631e2f4cee72745ae1def6f9b965cf160859.tar.gz nextcloud-server-c6bb631e2f4cee72745ae1def6f9b965cf160859.zip |
Always log errors from sending federation api requests to ease debugging
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | apps/cloud_federation_api/lib/Controller/RequestHandlerController.php | 1 | ||||
-rw-r--r-- | lib/private/Federation/CloudFederationProviderManager.php | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php index 02105fb3f9c..53448119af3 100644 --- a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php +++ b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php @@ -199,6 +199,7 @@ class RequestHandlerController extends Controller { $e->getCode() ); } catch (\Exception $e) { + $this->logger->error($e->getMessage(), ['exception' => $e]); return new JSONResponse( ['message' => 'Internal error at ' . $this->urlGenerator->getBaseUrl()], Http::STATUS_BAD_REQUEST diff --git a/lib/private/Federation/CloudFederationProviderManager.php b/lib/private/Federation/CloudFederationProviderManager.php index c25d4a40363..f077e36d97d 100644 --- a/lib/private/Federation/CloudFederationProviderManager.php +++ b/lib/private/Federation/CloudFederationProviderManager.php @@ -150,11 +150,12 @@ class CloudFederationProviderManager implements ICloudFederationProviderManager return (is_array($result)) ? $result : []; } } catch (\Exception $e) { + $this->logger->debug($e->getMessage(), ['exception' => $e]); + // if flat re-sharing is not supported by the remote server // we re-throw the exception and fall back to the old behaviour. // (flat re-shares has been introduced in Nextcloud 9.1) if ($e->getCode() === Http::STATUS_INTERNAL_SERVER_ERROR) { - $this->logger->debug($e->getMessage(), ['exception' => $e]); throw $e; } } |