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
-
@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 login
and 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 validatingClientName
here. I do not see an option other than to catchSystem.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