print status code on error

print status code on error