broamski / aws-mfa

Manage AWS MFA Security Credentials
MIT License
1.01k stars 163 forks source link

Fix parameter validation error message #43

Closed martina-if closed 4 years ago

martina-if commented 5 years ago

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
martina-if commented 4 years ago

@broamski can you take a look please? :)

R-M-F-at-C-A commented 10 months ago

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