opendoor-labs / rets

RETS Python 3 Client
MIT License
89 stars 43 forks source link

Raise error on invalid `content-type` response #35

Closed blakeembrey closed 5 years ago

blakeembrey commented 5 years ago

Raise a catchable error when headers['content-type'] is missing. While reviewing the code, I split the Location header response to exit earlier since the content-type header is not required on that code path. The next part will do the usual checks but also verify we have a content-type header. If not, we raise a RetsContentTypeError that contains the response and headers for easier debugging.