Skip to content
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

Return invalid username error instead of unknown error #2020

Merged
merged 6 commits into from
Jan 29, 2024

Conversation

SaurabhMSFT
Copy link
Contributor

If the username is empty or malformed then a InvalidUsername error is returned instead of UnknownError

Corresponding PR in common repo: AzureAD/microsoft-authentication-library-common-for-android#2297

return@withContext SignUpError(
errorType = ErrorTypes.INVALID_USERNAME,
errorMessage = "Empty or blank username",
correlationId = "UNSET" //TODO use null correlation id here and in other places in this file instead of UNSET
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this TODO? Why can't be left UNSET?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was old TODO when correlationId was nullable in your PR. This has now been removed.

SaurabhMSFT added a commit to AzureAD/microsoft-authentication-library-common-for-android that referenced this pull request Jan 28, 2024
@SaurabhMSFT SaurabhMSFT merged commit 56fd7d2 into dev Jan 29, 2024
9 checks passed
@SaurabhMSFT SaurabhMSFT deleted the saugautam/2768595 branch January 29, 2024 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants