You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also if you are expecting a body returned, the body should be checked as .toLower() or .toUpper() to remove variations in capitalization.
Per W3, the Bad Gateway error is capitalized. Unit tests expects: "Bad gateway error" when in reality it should be "Bad Gateway error". This caused the unit test to fail incorrectly
Also, both RFC2616 and RFC7231 indicate that the text listed in the RFCs for each status code is recommended text, not required text. There is no requirement that the text for any status code is capitalized or otherwise formatted in any particular manner. As noted in RFC2616, the status code itself is intended for computer-consumption while the text is intended for human consumption. Thus, returning "Bad gateway error" with a 404 status code is not incorrect (from the IETF's perspective) although it certainly could be misleading to a human.
Unit test requires a bad gateway error, but wants a 404 code returned. This is incorrect, bad gateway is error code 502.
Also, per W3 spec, no body should be returned for a 404, either.
https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
The text was updated successfully, but these errors were encountered: