Throw an error when performRequest fails