rveachkc / pymsteams

Format messages and post to Microsoft Teams.
https://pypi.org/project/pymsteams/
Apache License 2.0
422 stars 78 forks source link

Response returns True even for bad webhook urls #69

Closed sunny1978 closed 4 years ago

sunny1978 commented 4 years ago

I tried giving some bogus webhook and bogus channel. API is returning back true.

Webhook=“https://outlook.office.com/bogus” myTeamsMessage = pymsteams.connectorcard(Webhook) myTeamsMessage.text(test) _r = myTeamsMessage.send() _r True

I am using: pymsteams 0.1.12
python Python 3.7.3 [Clang 6.0 (clang-600.0.57)] on darwin

rveachkc commented 4 years ago

There's really not much I can do, other than pass along the http response sent from microsoft.

Previously, the module would check the status code, then discard the response object. I just pushed a release today, and with it, I created a class attribute for the connectorcard object that stores the response object as a class attribute. See the readme for more info: https://github.com/rveachkc/pymsteams/blob/master/README.md#troubleshooting-http-response