login: wrap and propagate errors - #232
Merged
Merged
Conversation
Wait() returned plain errors for verification and login failures, so the provisioning API replaced them with a generic 500 M_UNKNOWN "Internal error in login step". Map them onto declared RespErrors instead, reusing the existing parseLoginErrorDetails so LINE's own short reason strings are quoted where it gives one. Also stop formatting the raw Go error into the login form instructions when no reason could be parsed. That put internal detail directly in user-facing copy; it now shows a fixed message. CreateLogin ignored flowID entirely and returned the email login for any value, including a typo. Validate it against the advertised flow ID and return bridgev2.ErrInvalidLoginFlowID otherwise, and give that ID a named constant so the flow list and the check cannot drift apart. Note this does not change the larger contract question: a rejected password is still reported as a fresh user_input step on HTTP 200 rather than an error, so clients cannot distinguish it from a legitimate next step. That is worth deciding deliberately before changing.
|
highesttt
approved these changes
Aug 12, 2026
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.
No description provided.