@Override
  public ReplicationMetricList getReplicationMetrics(GetReplicationMetricsRequest replicationMetricsRequest) {
    boolean committed = false;
    try {
      openTransaction();
      ReplicationMetricList replicationMetrics = null;
      if (replicationMetricsRequest.isSetPolicy()) {
        replicationMetrics = getMReplicationMetrics(replicationMetricsRequest.getPolicy());
      } else if (replicationMetricsRequest.isSetScheduledExecutionId()) {
        replicationMetrics = getMReplicationMetrics(replicationMetricsRequest.getScheduledExecutionId());
      }
      committed = commitTransaction();
      return replicationMetrics;
    } finally {
      rollbackAndCleanup(committed, null);
    }
  }
Abbreviates the error message to the given size.

There might be error messages which may also contain a stack trace.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java