Show the HTTP status code in the error

Wanted to include this in 2e8e85c, but the code was always `None` and I didn't know why (sorry for not noticing that wasn't the `Request` object).