Improved error message

I think the status code information is missing regarding that checkError is checking the status code.