Repository navigation
Only save federated share after remote server is notified - #25262
Conversation
|
By analyzing the blame information on this pull request, we identified @schiessle, @PVince81 and @blizzz to be potential reviewers |
|
👍 makes sense |
|
👍 |
|
@icewind1991 please adjust the tests |
b106a9d to
8d32e1d
Compare
|
reworked it a bit, should be fine now |
| if ($send === false) { | ||
| $message_t = $this->l->t('Sharing %s failed, could not find %s, maybe the server is currently unreachable.', | ||
| [$share->getNode()->getName(), $share->getSharedWith()]); | ||
| throw new \Exception($message_t); |
There was a problem hiding this comment.
There are several things here that look weird to me:
- Throwing a plain exception doesn't look good. Is there any other more specific exception that could be used? Is it worthy to create a new custom exception for this?
- Catching all exceptions (the catch block) sounds very heavy. Do we really need to catch all, even though we rethrow the exception? Do we want to remove the share for any exception we catch? It will likely be fine (I don't see any reason it would fail) but, as I've said, heavy.
There was a problem hiding this comment.
Throwing a plain exception doesn't look good.
The exception throw is unchanged in this pr, I don't think we have a better one existing
There was a problem hiding this comment.
Do we really need to catch all, even though we rethrow the exception?
imo it's safest here to catch everything
|
That's all my comments for the new changes. |
|
👍 again for the changes |
|
Looks good, fed sharing still works 👍 |
* Revert "Merge pull request #25240 from owncloud/remove-svg" This reverts commit 8b8d2b6, reversing changes made to a35747b. * Revert "Merge pull request #25253 from owncloud/users-fixotherquotadropdown" This reverts commit a35747b, reversing changes made to a573b68. * Revert "Merge pull request #25314 from owncloud/files_external-backends-config" This reverts commit a573b68, reversing changes made to 8147eef. * Revert "Add all properties while creating a subscription (#25318)" This reverts commit aaf4c30. * Revert "Merge pull request #25276 from owncloud/delete-own-session-token" This reverts commit e42ce62, reversing changes made to aaf4c30. * Revert "Merge pull request #25262 from owncloud/fed-sharing-error" This reverts commit 027715f, reversing changes made to e42ce62.
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
If we fail to notify the remote share the entry in the share table is useless but the sharee will still think the file is shared.
Also improves error handling a bit by showing an error message if a non-json result is returned from the share call.
cc @owncloud/sharing @PVince81