add a test for an error in the api request