Package ai.shipeasy.admin.model
Enum ErrorCode
- All Implemented Interfaces:
Serializable,Comparable<ErrorCode>,java.lang.constant.Constable
Stable, machine-readable error code. Mirrors the `ErrorCode` catalogue in `@shipeasy/core`. Each operation lists the subset it can return under `x-error-codes`.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA resource with this name already exists in the project.Malformed request (bad JSON, missing project scope).The referenced event is still pending review and cannot back a metric yet.An archived experiment cannot be restarted.A field that is immutable while the experiment is running was modified.The experiment has no goal metric set, which the requested action requires.The action requires the experiment to be running.The experiment cannot be restored from its current state.A running experiment cannot be archived — stop it first.Key is valid but not allowed to act on this project.Experiment group weights must sum to 10000 (basis points).A field that is immutable in the current state was modified (e.g.Unexpected server error.The requested lifecycle transition is not allowed from the current state.The referenced metric does not exist or is not visible to the caller.The supplied metric id is malformed or not recognised.The resource does not exist or is not visible to the caller.The action would exceed a plan quota (e.g.The requested feature requires a higher plan tier (e.g.The resource is a read-only built-in (e.g.The resource cannot be archived/deleted while another resource still references it.A referenced entity (universe, metric, gate, event) does not exist.Missing or invalid admin SDK key.The request body failed structural (schema) validation. -
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorCodegetValue()toString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) static ErrorCodeReturns the enum constant of this type with the specified name.static ErrorCode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
BAD_REQUEST
Malformed request (bad JSON, missing project scope). -
UNAUTHORIZED
Missing or invalid admin SDK key. -
FORBIDDEN
Key is valid but not allowed to act on this project. -
PLAN_REQUIRED
The requested feature requires a higher plan tier (e.g. sequential testing, custom alpha, holdout, group count). -
NOT_FOUND
The resource does not exist or is not visible to the caller. -
ALREADY_EXISTS
A resource with this name already exists in the project. -
INVALID_TRANSITION
The requested lifecycle transition is not allowed from the current state. -
IMMUTABLE_FIELD
A field that is immutable in the current state was modified (e.g. editing allocation while running). -
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
The resource cannot be archived/deleted while another resource still references it. -
VALIDATION
The request body failed structural (schema) validation. -
REFERENCED_NOT_FOUND
A referenced entity (universe, metric, gate, event) does not exist. -
GROUPS_WEIGHT_SUM
Experiment group weights must sum to 10000 (basis points). -
EVENT_PENDING
The referenced event is still pending review and cannot back a metric yet. -
INTERNAL
Unexpected server error. -
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
The experiment has no goal metric set, which the requested action requires. -
EXPERIMENT_ARCHIVED_RESTART
An archived experiment cannot be restarted. -
EXPERIMENT_RESTORE_INVALID
The experiment cannot be restored from its current state. -
EXPERIMENT_NOT_RUNNING
The action requires the experiment to be running. -
EXPERIMENT_RUNNING_ARCHIVE
A running experiment cannot be archived — stop it first. -
EXPERIMENT_IMMUTABLE_FIELD
A field that is immutable while the experiment is running was modified. -
METRIC_NOT_FOUND
The referenced metric does not exist or is not visible to the caller. -
METRIC_UNKNOWN_ID
The supplied metric id is malformed or not recognised.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getValue
-
toString
-
fromValue
-
validateJsonElement
- Throws:
IOException
-