Only log the error if there is one