--- title: Changes to metafield definition error codes - Shopify developer changelog description: Shopify’s developer changelog documents all changes to Shopify’s platform. Find the latest news and learn about new platform opportunities. source_url: html: https://shopify.dev/changelog/changes-to-metafield-definition-error-codes md: https://shopify.dev/changelog/changes-to-metafield-definition-error-codes.md --- [Back to Developer changelog](https://shopify.dev/changelog) March 21, 2022 Tags: * API * 2022-04 # Changes to metafield definition error codes As of GraphQL Admin API version 2022-04, an error returns when a metafield definition is created with invalid characters in either the `key` or the `namespace` fields. The `key` and `namespace` fields can contain only alphanumeric characters, hyphens, and underscores. [Learn more about the `MetafieldDefinition` object](https://shopify.dev/api/admin-graphql/current/objects/MetafieldDefinition).