PagerDuty / pdpyras

Low-level PagerDuty REST/Events API client for Python
MIT License
129 stars 29 forks source link

Example incident creation code fails #78

Closed unixorn closed 2 years ago

unixorn commented 2 years ago

The example incident creation code fails with a 400 "You must specify a user's email address in the \"From\" header to perform this"

Traceback:

Traceback (most recent call last):
  File "/Users/jpb/Dropbox/s/pdcrier/bin/examplecode", line 20, in <module>
    pd_incident = session.rpost("incidents", json=payload)
  File "/Users/jpb/Library/Caches/pypoetry/virtualenvs/pdcrier-4jRKjqUa-py3.9/lib/python3.9/site-packages/pdpyras.py", line 145, in call
    r = raise_on_error(method(self, path, **pass_kw))
  File "/Users/jpb/Library/Caches/pypoetry/virtualenvs/pdcrier-4jRKjqUa-py3.9/lib/python3.9/site-packages/pdpyras.py", line 78, in raise_on_error
    raise PDHTTPError("%s %s: API responded with non-success status "
pdpyras.PDHTTPError: POST /incidents: API responded with non-success status (400): {"error":{"message":"You must specify a user's email address in the \"From\" header to perform this