Skip to content

Instantly share code, notes, and snippets.

@panoply
Created January 23, 2025 04:55
Show Gist options
  • Save panoply/bf6c3e3f948493e74eb548e36518dadc to your computer and use it in GitHub Desktop.
Save panoply/bf6c3e3f948493e74eb548e36518dadc to your computer and use it in GitHub Desktop.
known-shopify-api-error-messages.md

Layout files

  • Missing %{tag} in the %{location} section of the template

JSON in templates

  • '%{property}: must be an object'
  • unknown key '%{property}'
  • Section id '%{property}' is missing a type field
  • Section id '%{property}' must exist in %{property}
  • Section type '%{value}' does not refer to an existing section file

Apparent but unspecified

  • Expected [:end_of_string] but found %{something} in "%{token}"
  • invalid_expression = '[:end_of_string] is not a valid expression in "%{token}
  • Invalid expression type '#{invalid_expr}' in range expression

JSON in schema tag

  • Invalid tag 'schema': must be an object
  • Invalid schema: setting type is required
  • Invalid schema: '%{property}' is not a valid attribute
  • Invalid block '%{property}': type is required

Specified in Liquid Repository

https://github.com/Shopify/liquid/blob/03aafa974c2ace05605be5ce8cb732e92e4ca94d/lib/liquid/locales/en.yml

  • Syntax Error in '%{tag}' - Valid syntax: %{tag}
  • Syntax Error in 'assign' - Valid syntax: assign [var] = [source]
  • Syntax Error in 'capture' - Valid syntax: capture [var]
  • Syntax Error in 'case' - Valid syntax: case [condition],
  • Syntax Error in tag 'case' - Valid when condition: {% when [condition] [or condition2...] %}
  • Syntax Error in tag 'case' - Valid else condition: {% else %} (no parameters)
  • Syntax Error in 'cycle' - Valid syntax: cycle [name :] var [, var2, var3 ...]
  • Syntax Error in 'for loop' - Valid syntax: for [item] in [collection]"
  • Syntax error in tag 'render' - Template name must be a quoted string
  • Syntax Error in 'table_row loop' - Valid syntax: table_row [item] in [collection] cols=3
  • Syntax error in tag '#' - Each line of comments must be prefixed by the '#' character
  • Syntax Error in tag 'if' - Valid syntax: if [expression]
  • For loops require an 'in' clause
  • Variable '%{token}' was not properly terminated with regexp: %{tag_end}
  • Invalid attribute in for loop. Valid attributes are limit and offset
  • Invalid template encoding
  • Error in tag 'include' - Valid syntax: include '[template]' (with|for) [object|collection]
  • '%{tag}' is not a valid delimiter for %{block_name} tags. use %{block_delimiter}
  • '%{block_name}' tag was never closed
  • Tag '%{token}' was not properly terminated with regexp: %{tag_end}
  • %{block_name} tag does not expect 'else' tag
  • Unexpected outer '%{tag}' tag
  • Unknown tag '%{tag}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment