Log the error if there is one.