Merged
Conversation
|
@rullzer, thanks for your PR! By analyzing the annotation information on this pull request, we identified @BernhardPosselt, @DeepDiver1975 and @nickvergessen to be potential reviewers |
| @@ -0,0 +1,83 @@ | |||
| <?php | |||
| /** | |||
|
|
|||
Member
Author
There was a problem hiding this comment.
Mmm I just ran the license script. Will fix.
Member
|
I like it 👍 |
| * @return OCSResponse | ||
| */ | ||
| public function afterException($controller, $methodName, \Exception $exception) { | ||
| if ($controller instanceof OCSController) { |
Member
There was a problem hiding this comment.
I'd probably combine the if with the next if. That way you nest one level less which makes it much more readable
Member
Author
There was a problem hiding this comment.
Ah fair enough. Leftover from when I did not have the generic Exception yet. Will fix.
Member
|
Except for merging the two ifs I don't see anything that can be improved. If implemented 👍 |
* OCSException * OCSBadRequestException * OCSForbiddenException * OCSNotFoundException
Member
Author
|
Comments fixed. |
R0Wi
pushed a commit
to R0Wi/server
that referenced
this pull request
Nov 22, 2025
…ion-handling fix(notifications): Notifier::prepare() threw \InvalidArgumentExcepti…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds OCSMiddleware so apps that use OCSController have some control about the special way OCS works.
There is the generic OCSException and for now 3 speciailized exceptions for more type safety.
Also deprecated the old \OCP\API
Of course unit tests are added.
CC: @LukasReschke @nickvergessen @MorrisJobke @BernhardPosselt