emit more expressive errors when error http codes are encountered