tilfinltd / aws-extend-switch-roles

Extend your AWS IAM switching roles by Chrome extension, Firefox add-on, or Edge add-on
https://goo.gl/0QFjow
MIT License
1.31k stars 140 forks source link

Add Profile Name and Line Number to Config Save Error Messages #343

Open brandonkgarner opened 2 months ago

brandonkgarner commented 2 months ago

Adds profile name and line number to error messages during configuration save in the format: [profile_name]:##, or in the case that the profile name is not in the line (such as invalid parameter definition), grabs the value of the line: [line_value]:##

Addresses https://github.com/tilfinltd/aws-extend-switch-roles/issues/338 as I have run into the same issue multiple times.

Affects only ConfigLoadError/IniParseError that already supply a line-number from aesr-config:

Tested in Chrome and Firefox on MacOS 14.4.1 with the same results.

chrome-invalid_role_arn chrome-aws_account_not_specified chrome-invalid_param chrome-conflicting_options