let's move this error handling section up to right after `UnpackResponse` is called