alerta / alerta-contrib

Contributed integrations, plugins and custom webhooks
http://alerta.io
MIT License
119 stars 170 forks source link

plugin/alerta-prometheus: fix 500 error when response is not as expected #311

Closed icy closed 4 years ago

icy commented 4 years ago

Alertmanager Api may respond with empty set of silenceIds, which may cause exception

"alerta.exceptions.ApiError: Alertmanager: ERROR - list indices must be integers or slices, not str"

This error is seen from the client, and the Alert can not be ACK-ed

satterly commented 4 years ago

Thanks for the PR. Make the minor fix and I'll merge. 👍

satterly commented 4 years ago

:+1: