Dynatrace / Dynatrace-EventDrivenAnsible

Apache License 2.0
6 stars 8 forks source link

'NoneType' object is not iterable_ is not a good error #22

Open taruch opened 8 months ago

taruch commented 8 months ago

Describe the bug _Shutting down source: dynatrace.event_driven_ansible.dt_esaapi error : 'NoneType' object is not iterable

To Reproduce Steps to reproduce the behavior: We received this error under two circumstances:

  1. dt_api_host was incorrect - we used the FQDN as is shown in the README example without the /e/{uuid}. dt_api_host: "https://abc.live.dynatrace.com" or "https://abc.apps.dynatrace.com"
    1. Our token had markup added to the end when it was copied, resulting in an incorrect token (unable to login)

Expected behavior Expect an error that states you were unable to log in to the host.

agrimmer commented 7 months ago

I was able to reproduce the behavior: The plugin exits when the HTTP request in get_problems fails.

I did a small test on how the behavior could be fixed: https://github.com/Dynatrace/Dynatrace-EventDrivenAnsible/compare/fix/22-handle-failing-get-problems-calls?expand=1

I would be happy if anyone could take over.