--- title: EnvironmentVariablesUserErrorCode - GraphQL Admin description: Possible error codes that can be returned by `EnvironmentVariablesUserError`. api_version: unstable api_name: admin source_url: html: https://shopify.dev/docs/api/admin-graphql/unstable/enums/environmentvariablesusererrorcode md: https://shopify.dev/docs/api/admin-graphql/unstable/enums/environmentvariablesusererrorcode.md --- # Environment​Variables​User​Error​Code enum Possible error codes that can be returned by `EnvironmentVariablesUserError`. ## Valid values * CANT\_​MODIFY\_​READ\_​ONLY\_​ENVIRONMENT\_​VARIABLE A read-only environment variable can't be modified. * CANT\_​REVEAL\_​SECRET\_​VARIABLES You can't reveal secret variables. * DUPLICATE\_​ENVIRONMENT\_​VARIABLE\_​KEY\_​FOR\_​ENVIRONMENT You can't associate an environment to multiple environment variable values for the same key. * DUPLICATE\_​ENVIRONMENT\_​VARIABLE\_​KEY\_​ON\_​CREATE An environment variable with the same key already exists. * DUPLICATE\_​ENVIRONMENT\_​VARIABLE\_​KEY\_​VALUE An environment variable with the provided key-value already exists. * ENVIRONMENT\_​NOT\_​FOUND The environment provided wasn't found. * ENVIRONMENTS\_​NOT\_​FOUND The environments provided weren't found. * MAXIMUM\_​ENVIRONMENT\_​VARIABLES\_​PER\_​ENVIRONMENT You've reached the maximum number of variables for one of your environments. * STOREFRONT\_​DISCONNECTED Your storefront isn't connected to a GitHub repository. * STOREFRONT\_​NOT\_​FOUND The storefront was not found. * UNASSIGNED\_​ENVIRONMENT\_​VARIABLE\_​VALUE An environment variable is not assigned to any environment. * USER\_​INPUT\_​MUST\_​UPDATE\_​VARIABLES\_​WITH\_​THE\_​SAME\_​KEY The input updates environment variables with different keys. *** ## Fields * [Environment​Variables​User​Error.code](https://shopify.dev/docs/api/admin-graphql/unstable/objects/EnvironmentVariablesUserError#field-EnvironmentVariablesUserError.fields.code) 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 `EnvironmentVariablesUserError` 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](https://shopify.dev/docs/custom-storefronts/hydrogen). *** ## Map ### Fields with this enum * <-|[Environment​Variables​User​Error.code](https://shopify.dev/docs/api/admin-graphql/unstable/objects/EnvironmentVariablesUserError#field-EnvironmentVariablesUserError.fields.code)