You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Traceback when doing connected query for role that does not exist
To Reproduce
Steps to reproduce the behavior, please include information on suspected users/roles that are the source of the issue when possible: ❯ pmapper --profile test-terraform query 'preset connected role/does-not-exist *'
Traceback:
Traceback (most recent call last):
File "/opt/homebrew/bin/pmapper", line 8, in <module>
sys.exit(main())
File "/opt/homebrew/lib/python3.9/site-packages/principalmapper/__main__.py", line 149, in main
return query_cli.process_arguments(parsed_args)
File "/opt/homebrew/lib/python3.9/site-packages/principalmapper/querying/query_cli.py", line 123, in process_arguments
query_actions.query_response(
File "/opt/homebrew/lib/python3.9/site-packages/principalmapper/querying/query_actions.py", line 137, in query_response
handle_preset(graph, query, skip_admins)
File "/opt/homebrew/lib/python3.9/site-packages/principalmapper/querying/query_actions.py", line 193, in handle_preset
connected.handle_preset_query(graph, tokens, skip_admins)
File "/opt/homebrew/lib/python3.9/site-packages/principalmapper/querying/presets/connected.py", line 43, in handle_preset_query
print_connected_results(graph, source_nodes, dest_nodes, skip_admins)
File "/opt/homebrew/lib/python3.9/site-packages/principalmapper/querying/presets/connected.py", line 53, in print_connected_results
connection_result, path = is_connected(graph, snode, dnode)
File "/opt/homebrew/lib/python3.9/site-packages/principalmapper/querying/presets/connected.py", line 82, in is_connected
edge_lists = get_search_list(graph, source_node)
File "/opt/homebrew/lib/python3.9/site-packages/principalmapper/querying/query_utils.py", line 40, in get_search_list
if node.is_admin:
AttributeError: 'NoneType' object has no attribute 'is_admin'
Expected behavior
Should handle error gracefully. maybe telling me the user does not exist?
Describe the bug
Traceback when doing connected query for role that does not exist
To Reproduce
Steps to reproduce the behavior, please include information on suspected users/roles that are the source of the issue when possible:
❯ pmapper --profile test-terraform query 'preset connected role/does-not-exist *'
Traceback:
Expected behavior
Should handle error gracefully. maybe telling me the user does not exist?
Version: principalmapper: stable 1.1.5 (bottled) (brew)
The text was updated successfully, but these errors were encountered: