@Override
  public void scheduledQueryMaintenance(ScheduledQueryMaintenanceRequest request)
      throws MetaException, NoSuchObjectException, AlreadyExistsException, InvalidInputException {
    ensureScheduledQueriesEnabled();
    switch (request.getType()) {
    case CREATE:
      scheduledQueryInsert(request.getScheduledQuery());
      break;
    case ALTER:
      scheduledQueryUpdate(request.getScheduledQuery());
      break;
    case DROP:
      scheduledQueryDelete(request.getScheduledQuery());
      break;
    default:
      throw new MetaException("invalid request");
    }
  }
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