diff options
author | Joas Schilling <coding@schilljs.com> | 2022-06-07 22:00:26 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-06-07 22:01:32 +0200 |
commit | 1cc2796613808dac5a2b444fc313b6a9fab0798b (patch) | |
tree | 8772e6bb60dd38bd7ffa4c3db5213f289a0f3d8f | |
parent | dcf25d6c7716daa08eb6af07a720c0a0b7b6eda6 (diff) | |
download | nextcloud-server-1cc2796613808dac5a2b444fc313b6a9fab0798b.tar.gz nextcloud-server-1cc2796613808dac5a2b444fc313b6a9fab0798b.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; } } |