fixes to api call get request and handle error