---
title: MetafieldsSetUserErrorCode - Storefront API
description: Possible error codes that can be returned by `MetafieldsSetUserError`.
api_version: 2026-10
source_url:
  html: >-
    https://shopify.dev/docs/api/storefront/latest/enums/MetafieldsSetUserErrorCode
  md: >-
    https://shopify.dev/docs/api/storefront/latest/enums/MetafieldsSetUserErrorCode.md
api_name: storefront
api_type: graphql
type: enum
---

# Metafields​Set​User​Error​Code

enum

Possible error codes that can be returned by `MetafieldsSetUserError`.

## Valid values

* APP\_​NOT\_​AUTHORIZED

  The current app is not authorized to perform this action.

* BLANK

  The input value is blank.

* INCLUSION

  The input value isn't included in the list.

* INVALID\_​OWNER

  The owner ID is invalid.

* INVALID\_​TYPE

  The type is invalid.

* INVALID\_​VALUE

  The value is invalid for metafield type or for definition options.

* LESS\_​THAN\_​OR\_​EQUAL\_​TO

  The input value should be less than or equal to the maximum value allowed.

* PRESENT

  The input value needs to be blank.

* TOO\_​LONG

  The input value is too long.

* TOO\_​SHORT

  The input value is too short.

***

## Fields

* [Metafields​Set​User​Error.code](https://shopify.dev/docs/api/storefront/latest/objects/MetafieldsSetUserError#field-MetafieldsSetUserError.fields.code)

  OBJECT

  An error that occurs during the execution of `MetafieldsSet`.

***

## Map

### Fields with this enum

* [Metafields​Set​User​Error.code](https://shopify.dev/docs/api/storefront/latest/objects/MetafieldsSetUserError#field-MetafieldsSetUserError.fields.code)
