Improve error message for failed requests