How to handle unauthenticated case when using user profile method? #3535
-
|
We are using It throws following error if user is not authenticated via aws cli Is it possible to make this code throw some kind of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
@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 EDIT: I have reviewed this with the team and created an internal backlog item to use better exception classes. Thanks, |
Beta Was this translation helpful? Give feedback.
@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 loginand AWS .NET SDK takes care of the rest. In your use case, since you didn't execute AWS CLI commandaws sso login, it failed while validatingClientNamehere. I do not see an option other than to catchSystem.ArgumentNullExceptionand 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