add basic request error handling