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

Relax checks on response status code #389

Merged
merged 1 commit into from
May 21, 2024
Merged

Conversation

imjoehaines
Copy link
Contributor

Goal

Currently we require a 200 status code for events and a 202 for sessions but there's no need to be so specific as any 2xx status indicates success

Now we only warn on codes outside of the 2xx range, unless a specific code has been set in options['success']. If a specific code is given then it must match exactly, i.e. it has the same behaviour as before

This generally shouldn't affect users as the event & session endpoints always respond with 200 & 202 but can prevent spurious warnings if delivering to a custom service that doesn't use the same codes (e.g. a forwarding agent)

Currently we require a 200 status code for events and a 202 for sessions
but there's no need to be so specific as any 2xx status indicates
success

Now we only warn on codes outside of the 2xx range, unless a specific
code has been set in `options['success']`. If a specific code is given
then it must match exactly, i.e. it has the same behaviour as before
@imjoehaines imjoehaines requested a review from tomlongridge May 21, 2024 05:53
@imjoehaines imjoehaines enabled auto-merge (rebase) May 21, 2024 06:00
@imjoehaines imjoehaines merged commit 9652f4b into next May 21, 2024
39 checks passed
@imjoehaines imjoehaines deleted the relax-status-code-check branch May 21, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants