e can be nil here, but will cause problems in log_error if nil