Repository navigation
throw ShareNotFound when share id is not an integer - #39873
Merged
Merged
Conversation
phil-davis
requested review from
AlexAndBear,
IljaN,
JammingBen and
jvillafanez
March 12, 2022 20:15
phil-davis
force-pushed
the
fix-issue-39868
branch
from
March 13, 2022 00:06
c695190 to
8705f94
Compare
|
Kudos, SonarCloud Quality Gate passed! |
jvillafanez
approved these changes
Mar 14, 2022
jvillafanez
left a comment
Member
There was a problem hiding this comment.
Just a tiny optional comment
|
|
||
| public function getShareByIdNotExistProvider() { | ||
| return [ | ||
| [1], |
Member
There was a problem hiding this comment.
we might need a short comment to explain why this is case is expected to fail.
This was referenced Mar 21, 2022
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.








Description
Throw ShareNotFound early when share id is not an integer, rather than attempting to query the database.
Both share-providers only work with integer share-ids. I added the check to both of them, rather than to some higher-level common code, because it is possible that another future share provider could implement share-ids with a different format.
Related Issue
How Has This Been Tested?
CI - see PR #39872 - that runs acceptance tests with pgsql and demonstrates the fails before the code fix, and that it passes after the code fix.
Types of changes
Checklist: