Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend validation to assert specific response text #81

Merged
merged 2 commits into from
Jan 28, 2021

Conversation

atc0005
Copy link
Owner

@atc0005 atc0005 commented Jan 28, 2021

Per stmoody's report in the rveachkc/pymsteams project, Microsoft Teams webhook endpoint(s) will return a 200 status response code in some scenarios when a message was actually (seemingly silently) rejected due to size limits. Microsoft Teams developers shared that a response string of 1 must be present alongside a 200 status response code to indicate successful message submission by the client.

This commit extends response validation to check for the presence of this specific response string, otherwise returns a custom error along with a description of what was expected and what was actually received.

Per @stmoody's report in the `rveachkc/pymsteams` project,
Microsoft Teams webhook endpoint(s) will return a 200 status
response code in some scenarios when a message was actually
(seemingly silently) rejected due to size limits. Microsoft
Teams developers shared that a response string of `1` must
be present alongside a 200 status response code to indicate
successful message submission by the client.

This commit extends response validation to check for the
presence of this specific response string, otherwise returns
a custom error along with a description of what was expected
and what was actually received.

refs rveachkc/pymsteams#75
refs GH-59
Current tests fail with prior change, pass now with updated
response text to match updated validation requirement.

refs GH-59
@atc0005 atc0005 added bug Something isn't working api labels Jan 28, 2021
@atc0005 atc0005 added this to the v2.4.1 milestone Jan 28, 2021
@atc0005 atc0005 self-assigned this Jan 28, 2021
@atc0005 atc0005 merged commit 5bb7538 into master Jan 28, 2021
@atc0005 atc0005 deleted the i59-extend-response-validation branch January 28, 2021 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Microsoft Teams Webhook Connector "200 OK" status insufficient indication of success
1 participant