Adjust API wrapper to handle errors from WebApi