Better handling of errors pushing to the API.