PagerDutyAlerter class appears to lack handling of non-Latin languages in alert subject / text. Specifically, with Japanese characters HTTP requests fail with the below error:
"UnicodeEncodeError: codec can't encode characters in position 106-125: Body (<redacted>) is not valid Latin-1. Use body.encode(\u0027utf-8\u0027) if you want to send it encoded in UTF-8." ] }'
Tested that specifying encoding as utf-8 on line 1419 of alerts.py resolves the issue.
PagerDutyAlerter class appears to lack handling of non-Latin languages in alert subject / text. Specifically, with Japanese characters HTTP requests fail with the below error:
"UnicodeEncodeError: codec can't encode characters in position 106-125: Body (<redacted>) is not valid Latin-1. Use body.encode(\u0027utf-8\u0027) if you want to send it encoded in UTF-8." ] }'
Tested that specifying encoding as utf-8 on line 1419 of alerts.py resolves the issue.
data=json.dumps(payload, cls=DateTimeEncoder, ensure_ascii=False).encode("utf-8")