Repository navigation
fix: report hidden reminders exactly like missing ones - #9
Merged
Merged
Conversation
Updating or deleting a reminder outside the allowed lists failed with "Reminder not found or not accessible", while a reminder that doesn't exist failed with "Reminder not found: <id>". The different wording let a caller confirm that a guessed ID exists outside its allowed lists. reminderAccessDenied now carries the caller-supplied ID and shares one errorDescription arm with reminderNotFound, so the two messages are identical by construction. The test compares the two messages directly; the old one checked the denied text against a fixed string, which is how the difference got through.
|
🎉 This PR is included in version 2.0.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Updating or deleting a reminder that exists but sits outside the allowed lists used to fail with a different message from a reminder that doesn't exist:
Reminder not found: <id>Reminder not found: <id>Reminder not found or not accessibleReminder not found: <id>The different wording let a caller confirm that a guessed ID exists outside its allowed lists.
b351a87closed this for single-reminder lookups, which returnnileither way, but not for update and delete. A code comment said the two messages must match, and they didn't. #1's description and the v2.0.0 draft notes both overstated the fix; the published v2.0.0 notes claim only that the list ID no longer leaks, which is true.Change
reminderAccessDeniednow carries the caller's reminder ID, and it shares oneerrorDescriptionarm withreminderNotFound. The messages are identical by construction rather than by a comment asking them to match.Verification
swift testpasses all 165 tests (139 + 26) with complete strict-concurrency checking and warnings-as-errors.Release
Merging this releases v2.0.1 automatically through semantic-release: a
fix:title releases a patch. It will be the pipeline's first real release.