* Improve error return of api call