make error about wrong http response code a bit more accurate