[PM-30993] Better Error Message for Expired Invitation Tokens#6971
[PM-30993] Better Error Message for Expired Invitation Tokens#6971sven-bitwarden wants to merge 8 commits intomainfrom
Conversation
|
New Issues (2)Checkmarx found the following issues in this Pull Request
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6971 +/- ##
=======================================
Coverage 57.08% 57.08%
=======================================
Files 2028 2028
Lines 88794 88801 +7
Branches 7914 7917 +3
=======================================
+ Hits 50684 50691 +7
Misses 36279 36279
Partials 1831 1831 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Claude finished @sven-bitwarden's task in 2m 25s —— View job Code Review: PM-30993 Better Error Message for Expired Invitation TokensReviewed commit: 896474a (Merge branch 'main' into ac/pm-30993/update-expired-token-exception-message) Files reviewed (4):
SummaryThis PR adds a public FindingsNo issues found. The implementation is clean and correct:
✅ This PR looks good to merge. |
JaredSnider-Bitwarden
left a comment
There was a problem hiding this comment.
Nice work!
…essage # Conflicts: # src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/AcceptOrgUserCommand.cs
0d3fc39
|
@JaredScar @JaredSnider-Bitwarden sorry y'all, my prior PR #6972 had a conflict here 🙏 |
|






🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-30993
📔 Objective
The server currently sends a nondescript
Invalid token.error message when accepting an invalid token. While technically true, we want to be kinder to users accepting expired tokens, giving them a better error message.Other Considerations
I thought about enhancing the Tokenable API to be return a
TokenableValidationResult, which could mirror the existing inheritance hierarchy to return objects that indicate what went wrong. For example, Tokenable returns TokenableValidationResult, ExpiringTokenable returns ExpiringTokenableValidationResult.. each tacking on new metadata.I opted not to do this, as this is so far the only Tokenable area that is interested in knowing what validation failed, and I didn't want to force the creation of N result classes (one for each Tokenable derivative).
📸 Screenshots