Log the HTTP error codes when available.