Enum Class BulkErrorClassification

java.lang.Object
java.lang.Enum<BulkErrorClassification>
ai.attackframework.tools.burp.utils.opensearch.BulkErrorClassification
All Implemented Interfaces:
Serializable, Comparable<BulkErrorClassification>, Constable

public enum BulkErrorClassification extends Enum<BulkErrorClassification>
Classifies a per-item OpenSearch bulk error as either permanently rejected or transient/retryable.

Permanently rejected errors indicate the document will never succeed as-is - typically mapping or schema violations such as the Lucene immense-term cap, exceeded nested-object limits, or strict-mapping rejections. The retry coordinator drops these after one attempt (the "poison-pill" short-circuit) so the retry queue cannot loop on them.

Transient errors cover cluster backpressure, temporary shard unavailability, timeouts, and the default "unknown" case. The retry coordinator re-queues these so they can succeed once the cluster recovers.

  • Enum Constant Details

  • Method Details

    • values

      public static BulkErrorClassification[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static BulkErrorClassification valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • of

      public static BulkErrorClassification of(String type)
      Classifies a bulk item error based on its OpenSearch-supplied type.

      Unknown or null types classify as TRANSIENT deliberately: retrying an unclassified failure is safer than dropping it. Add a type to PERMANENT_TYPES only when it represents a true document-level reject.

      Parameters:
      type - the OpenSearch error type (e.g. "mapper_parsing_exception")
      Returns:
      PERMANENT when the type is known-permanent, otherwise TRANSIENT