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

Fix parameter validation error message #43

Closed
wants to merge 1 commit into from

Conversation

martina-if
Copy link

closes #36

When using a session duration of less than 900 seconds aws-mfa prints a misleading error message "Token must be six digits".

This PR prints the actual error. In the case of an invalid duration it will print the following:

INFO - Fetching Credentials - Profile: <profile>, Duration: 800
ERROR - Parameter validation failed:
Invalid range for parameter DurationSeconds, value: 800, valid range: 900-inf

closes broamski#36 

When using a session duration of less than 900 seconds aws-mfa prints a misleading error message "Token must be six digits".

This PR prints the actual error. In the case of an invalid duration it will print the following:

```
INFO - Fetching Credentials - Profile: <profile>, Duration: 800
ERROR - Invalid parameter: Parameter validation failed:
Invalid range for parameter DurationSeconds, value: 800, valid range: 900-inf
```
@martina-if
Copy link
Author

@broamski can you take a look please? :)

andrewwheal pushed a commit to andrewwheal/aws-mfa that referenced this pull request Oct 22, 2019
@martina-if martina-if closed this Jan 8, 2020
@R-M-F-at-C-A
Copy link

Can this be merged? The issue is still present 4 years later. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ERROR - Token must be six digits
2 participants