Skip to content

How to handle unauthenticated case when using user profile method? #3535

You must be logged in to vote

@victor-ivanov Good afternoon. Thanks for starting the discussion. Looks like you are using SSO profile. To use SSO profile, one needs to be authenticated via aws sso login and AWS .NET SDK takes care of the rest. In your use case, since you didn't execute AWS CLI command aws sso login, it failed while validating ClientName here. I do not see an option other than to catch System.ArgumentNullException and look out for specific exception message (which I agree is not scalable).

EDIT: I have reviewed this with the team and created an internal backlog item to use better exception classes.

Thanks,
Ashish

Replies: 1 comment

You must be logged in to vote
0 replies
Answer selected by ashishdhingra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
needs-reproduction This issue needs reproduction.
2 participants