fixing error handling for api requests
pulling down latest endpoints definition and added tests for the new endpoints