Skip to content

Conversation

@jjb
Copy link

@jjb jjb commented Mar 2, 2018

As of May 2017, successful submissions to stathat do
not return a body, and the test suite (correctly) fails:

https://blog.stathat.com/2017/05/05/bandwidth.html

This changes the code and tests to accommodate this new behavior.

  • the success code is now 200, not 204, so all 200s are
    considered successful
  • because there is no body, we no longer check for resp.msg == "ok"
  • oddly, failures return a "status: 500" in their body, but
    still have a 200 success code. I don't know if this is desired behavior or a bug,
    and I don't know how long this has been the case. i have written to StatHat support about it.
    so, we still parse for a code in the body and let it take precedent

As of May 2017, successful submissions to stathat do
not return a body:

https://blog.stathat.com/2017/05/05/bandwidth.html

This changes the code and tests to accommodate this new behavior.

- the success code is now 200, not 204, so all 200s are
  considered successful
- because there is no body, we no longer check for resp.msg == "ok"
- oddly, failures return a "status: 500" in their body, but
  still have a 200 success code. I don't know if this is desired behavior or a bug,
  and I don't know how long this has been the case. i have written to StatHat support about it.
  so, we still parse for a code in the body and let it take precedent
@jjb jjb mentioned this pull request Mar 2, 2018
@jjb jjb closed this Mar 19, 2018
@jjb jjb deleted the accomodate-new-success-behavior branch March 19, 2018 21:06
@jjb jjb restored the accomodate-new-success-behavior branch March 20, 2018 21:01
@jjb jjb reopened this Mar 20, 2018
@jjb jjb force-pushed the accomodate-new-success-behavior branch from ca64779 to 462cabd Compare March 20, 2018 21:06
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