[facebook] Improve error handling (#8572)