Environment Variables User Error Code
Possible error codes that can be returned by .
Anchor to Valid valuesValid values
- Anchor to CANT_MODIFY_READ_ONLY_ENVIRONMENT_VARIABLECANT_
MODIFY_ READ_ ONLY_ ENVIRONMENT_ VARIABLE A read-only environment variable can't be modified.
- Anchor to CANT_REVEAL_SECRET_VARIABLESCANT_
REVEAL_ SECRET_ VARIABLES You can't reveal secret variables.
- Anchor to DUPLICATE_ENVIRONMENT_VARIABLE_KEY_FOR_ENVIRONMENTDUPLICATE_
ENVIRONMENT_ VARIABLE_ KEY_ FOR_ ENVIRONMENT You can't associate an environment to multiple environment variable values for the same key.
- Anchor to DUPLICATE_ENVIRONMENT_VARIABLE_KEY_ON_CREATEDUPLICATE_
ENVIRONMENT_ VARIABLE_ KEY_ ON_ CREATE An environment variable with the same key already exists.
- Anchor to DUPLICATE_ENVIRONMENT_VARIABLE_KEY_VALUEDUPLICATE_
ENVIRONMENT_ VARIABLE_ KEY_ VALUE An environment variable with the provided key-value already exists.
- Anchor to ENVIRONMENT_NOT_FOUNDENVIRONMENT_
NOT_ FOUND The environment provided wasn't found.
- Anchor to ENVIRONMENTS_NOT_FOUNDENVIRONMENTS_
NOT_ FOUND The environments provided weren't found.
- Anchor to MAXIMUM_ENVIRONMENT_VARIABLES_PER_ENVIRONMENTMAXIMUM_
ENVIRONMENT_ VARIABLES_ PER_ ENVIRONMENT You've reached the maximum number of variables for one of your environments.
- Anchor to STOREFRONT_DISCONNECTEDSTOREFRONT_
DISCONNECTED Your storefront isn't connected to a GitHub repository.
- Anchor to STOREFRONT_NOT_FOUNDSTOREFRONT_
NOT_ FOUND The storefront was not found.
- Anchor to UNASSIGNED_ENVIRONMENT_VARIABLE_VALUEUNASSIGNED_
ENVIRONMENT_ VARIABLE_ VALUE An environment variable is not assigned to any environment.
- Anchor to USER_INPUT_MUST_UPDATE_VARIABLES_WITH_THE_SAME_KEYUSER_
INPUT_ MUST_ UPDATE_ VARIABLES_ WITH_ THE_ SAME_ KEY The input updates environment variables with different keys.
Anchor to FieldsFields
- •OBJECT
Catches validation problems when you're setting up environment variables for your Hydrogen storefronts. When something goes wrong with your variable configuration, these errors tell you exactly what needs fixing so you can get your storefront running smoothly.
For example, when setting an invalid environment variable name or value that conflicts with system requirements, this error type captures the specific field and validation message to guide resolution.
Use
to:
- Handle environment variable validation failures
- Display specific error messages to developers
- Identify which fields need correction
- Provide clear feedback during storefront configuration
Each error includes the problematic field name and a descriptive message explaining the validation requirement that wasn't met.
Learn more about Hydrogen storefront configuration.