Fix reporting errors with wrong types passed to HostingServiceHTTPRequest.
Review Request #11644 — Created June 3, 2021 and submitted
HostingServiceHTTPRequest
checks for the type on thebody
and
headers
arguments during construction, logging and raising an
exception if types aren't correct.This fails, since the logging code attempts to report information on the
request that isn't yet set at that point during construction.To address this, we're now setting those attributes on the class before
we perform any type checking.
Unit tests pass.
Summary | ID |
---|---|
b57e72b1655f3665c3e965da9ea3838c244d9d65 |
- Change Summary:
-
Update unit tests to check the affected
headers
argument as well. - Description:
-
~ HostingServiceHTTPRequest
checks for the type on thebody
argument~ during construction, logging and raising an exception if it's anything ~ but None
or abytes
.~ HostingServiceHTTPRequest
checks for the type on thebody
and~ headers
arguments during construction, logging and raising an~ exception if types aren't correct. This fails, since the logging code attempts to report information on the
request that isn't yet set at that point during construction. To address this, we're now setting those attributes on the class before
we perform any type checking. - Commits:
-
Summary ID 9ca19b06f52e1a8269d867653ac2e5d2e048f7f3 b57e72b1655f3665c3e965da9ea3838c244d9d65