Adds error handling for social share