Enum ErrorCode

java.lang.Object
java.lang.Enum<ErrorCode>
ai.shipeasy.admin.model.ErrorCode
All Implemented Interfaces:
Serializable, Comparable<ErrorCode>, java.lang.constant.Constable

public enum ErrorCode extends Enum<ErrorCode>
Stable, machine-readable error code. Mirrors the `ErrorCode` catalogue in `@shipeasy/core`. Each operation lists the subset it can return under `x-error-codes`.
  • Enum Constant Details

    • BAD_REQUEST

      public static final ErrorCode BAD_REQUEST
      Malformed request (bad JSON, missing project scope).
    • UNAUTHORIZED

      public static final ErrorCode UNAUTHORIZED
      Missing or invalid admin SDK key.
    • FORBIDDEN

      public static final ErrorCode FORBIDDEN
      Key is valid but not allowed to act on this project.
    • PLAN_REQUIRED

      public static final ErrorCode PLAN_REQUIRED
      The requested feature requires a higher plan tier (e.g. sequential testing, custom alpha, holdout, group count).
    • NOT_FOUND

      public static final ErrorCode NOT_FOUND
      The resource does not exist or is not visible to the caller.
    • ALREADY_EXISTS

      public static final ErrorCode ALREADY_EXISTS
      A resource with this name already exists in the project.
    • INVALID_TRANSITION

      public static final ErrorCode INVALID_TRANSITION
      The requested lifecycle transition is not allowed from the current state.
    • IMMUTABLE_FIELD

      public static final ErrorCode IMMUTABLE_FIELD
      A field that is immutable in the current state was modified (e.g. editing allocation while running).
    • READ_ONLY

      public static final ErrorCode READ_ONLY
      The resource is a read-only built-in (e.g. a built-in gate-rule template) and cannot be modified or deleted.
    • REFERENCED_IN_USE

      public static final ErrorCode REFERENCED_IN_USE
      The resource cannot be archived/deleted while another resource still references it.
    • VALIDATION

      public static final ErrorCode VALIDATION
      The request body failed structural (schema) validation.
    • REFERENCED_NOT_FOUND

      public static final ErrorCode REFERENCED_NOT_FOUND
      A referenced entity (universe, metric, gate, event) does not exist.
    • GROUPS_WEIGHT_SUM

      public static final ErrorCode GROUPS_WEIGHT_SUM
      Experiment group weights must sum to 10000 (basis points).
    • EVENT_PENDING

      public static final ErrorCode EVENT_PENDING
      The referenced event is still pending review and cannot back a metric yet.
    • INTERNAL

      public static final ErrorCode INTERNAL
      Unexpected server error.
    • PLAN_LIMIT

      public static final ErrorCode PLAN_LIMIT
      The action would exceed a plan quota (e.g. the tier's maximum experiments, metrics, or configs). Upgrade the plan or archive an existing resource.
    • EXPERIMENT_NO_GOAL_METRIC

      public static final ErrorCode EXPERIMENT_NO_GOAL_METRIC
      The experiment has no goal metric set, which the requested action requires.
    • EXPERIMENT_ARCHIVED_RESTART

      public static final ErrorCode EXPERIMENT_ARCHIVED_RESTART
      An archived experiment cannot be restarted.
    • EXPERIMENT_RESTORE_INVALID

      public static final ErrorCode EXPERIMENT_RESTORE_INVALID
      The experiment cannot be restored from its current state.
    • EXPERIMENT_NOT_RUNNING

      public static final ErrorCode EXPERIMENT_NOT_RUNNING
      The action requires the experiment to be running.
    • EXPERIMENT_RUNNING_ARCHIVE

      public static final ErrorCode EXPERIMENT_RUNNING_ARCHIVE
      A running experiment cannot be archived — stop it first.
    • EXPERIMENT_IMMUTABLE_FIELD

      public static final ErrorCode EXPERIMENT_IMMUTABLE_FIELD
      A field that is immutable while the experiment is running was modified.
    • METRIC_NOT_FOUND

      public static final ErrorCode METRIC_NOT_FOUND
      The referenced metric does not exist or is not visible to the caller.
    • METRIC_UNKNOWN_ID

      public static final ErrorCode METRIC_UNKNOWN_ID
      The supplied metric id is malformed or not recognised.
  • Method Details

    • values

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

      public static ErrorCode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
    • toString

      public String toString()
      Overrides:
      toString in class Enum<ErrorCode>
    • fromValue

      public static ErrorCode fromValue(String value)
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Throws:
      IOException