public static IcebergRestErrorCode exceptionToCode(Exception e) {
      if (e instanceof UnsupportedOperationException) {
        return UnsupportedOperation;
      } else if (e instanceof ObjectNotExistsException) {
        return NotFound;
      } else if (e instanceof CommitFailedException) {
        return Conflict;
      } else if (e instanceof NoSuchTableException) {
        return NotFound;
      } else if (e instanceof NoSuchNamespaceException) {
        return NotFound;
      } else if (e instanceof AlreadyExistsException) {
        return Conflict;
      }
      return InternalServerError;
    }
POST PREFIX/v1/catalogs/{catalog}/namespaces/{namespace}/tables/{table}/metrics
amoro-ams/src/main/java/org/apache/amoro/server/RestCatalogService.java