Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ public function addShare($shareWith, $name, $description, $providerId, $owner, $
$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
Expand Down
3 changes: 2 additions & 1 deletion lib/private/Federation/CloudFederationProviderManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,12 @@ public function sendShare(ICloudFederationShare $share) {
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;
}
}
Expand Down