-
Notifications
You must be signed in to change notification settings - Fork 849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PM-18496: Propagate prevalidateSso API error message #4759
Conversation
Great job, no security vulnerabilities found in this Pull Request |
9352e95
to
c89a7c4
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4759 +/- ##
==========================================
- Coverage 89.33% 89.29% -0.04%
==========================================
Files 490 492 +2
Lines 41455 41644 +189
Branches 5897 5919 +22
==========================================
+ Hits 37032 37186 +154
- Misses 2388 2411 +23
- Partials 2035 2047 +12 ☔ View full report in Codecov by Sentry. |
message = R.string.organization_sso_identifier_required.asText(), | ||
), | ||
orgIdentifierInput = authRepository.rememberedOrgIdentifier ?: "", | ||
orgIdentifierInput = authRepository.rememberedOrgIdentifier.orEmpty(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
val bitwardenError = throwable.toBitwardenError() | ||
bitwardenError | ||
.parseErrorBodyOrNull<PrevalidateSsoResponseJson.Error>( | ||
code = 400, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💭 Def not a blocker just a thought, would it make sense to represent the code as constants or even like an enum. Only benefit would be removing the magic number suppression. The counter point is the HTTP error codes for 4XX/5XX are pretty standard really.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about making a bunch of constants for it but an enum could work as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dseverns-livefront |
🎟️ Tracking
PM-18496
📔 Objective
This PR propagates the the API error from the
prevalidateSso
API to the UI layer.📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmedissue and could potentially benefit from discussion
:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes