> For the complete documentation index, see [llms.txt](https://developers.felt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.felt.com/felt-style-language/errors.md).

# Errors

Felt validates a style before it applies it. Where the errors show up depends on how you set the style:

* **In-app style editor**: errors appear as a banner, one message per line.
* **REST API** ([`update_style`](/rest-api/styling-layers.md)): the request fails with `422`. The error has the title `Invalid style format` and the detail `The provided style is an invalid Felt Style Language document`. The individual validation messages are in that error's own `errors` array:

  ```json
  {
    "errors": [
      {
        "title": "Invalid style format",
        "detail": "The provided style is an invalid Felt Style Language document",
        "source": { "pointer": "/style" },
        "errors": [
          "Visualization: Attribute 'lineCap' is not a supported value. Supported values are butt, round, square"
        ]
      }
    ]
  }
  ```
* **JS SDK**: `setLayerStyle` rejects with an `Error` whose message is the validation messages joined by newlines.
* **Felt MCP server and AI tools**: the tool returns `Invalid FSL:` followed by the messages, separated by `;` . These tools also run [strict checks](#strict-validation-felt-mcp-server-and-ai-tools) that the editor, REST API and SDK don't run.

In the messages below, `<attribute>` is the property name you set (for example `strokeWidth`), and `<value>` is the value you gave it.

{% hint style="info" %}
Most `paint` and `label` value checks run only for `categorical`, `numeric`, `heatmap`, `hillshade` and `h3` styles. For `simple` styles, Felt checks `version`, the `config`, `legend`, `attributes` and `popup` blocks, and the boolean and icon options in `paint` and `label`, but it doesn't check values like `color`, `strokeWidth` or `lineCap`. An invalid value in a `simple` style may be accepted and then fail to render.
{% endhint %}

### Malformed style

**Problem**: The style isn't valid JSON, or it's missing something Felt needs to read it.

**Solution**: Check the JSON syntax, and make sure the style has a `version` (currently `"2.3.1"`).

**Error messages:**

* `The style must be a valid JSON object` (style editor)
* `The style is missing some required properties` (style editor)
* `Style must have 'version' attribute` (style editor)
* `Style 'version' definition must be a string`
* `Style 'version' value must be one of 1.0, 1.1, 1.2, 1.2.1, 1.2.2, 1.3, 1.3.1, 1.3.2, 2.0, 2.1, 2.1.1, 2.2, 2.3, 2.3.1`
* `Visualization has an invalid type`. The `type` must be one of `simple`, `categorical`, `numeric`, `heatmap`, `hillshade` or `h3`.

### Unexpected value or type

**Problem**: One of the values in the style has an unsupported value or an invalid type.

**Solution**: Change the value to one the message lists, or to the type it names. See [the paint block](/felt-style-language/style-definition-blocks/the-paint-block.md) and [the label block](/felt-style-language/style-definition-blocks/the-label-block.md) for each property's accepted values.

**Error messages:**

* `Visualization: Attribute '<attribute>' is not a number`. Applies to `strokeWidth`, `opacity`, `haloWidth`, `lineHeight`, `letterSpacing`, `maxLineChars`, `repeatDistance` and `offset`.
* `Visualization: Attribute '<attribute>' is not a string`. Applies to `color`, `strokeColor`, `highlightColor`, `highlightStrokeColor`, and the label `color`, `haloColor`, `fontStyle` and `textTransform`.
* `Visualization: Attribute 'size' is not a number or string`
* `Visualization: Attribute 'fontSize' is not a number or an object`
* `Visualization: Attribute 'lineCap' is not a supported value. Supported values are butt, round, square`
* `Visualization: Attribute 'lineJoin' is not a supported value. Supported values are bevel, round, miter`
* `Visualization dashArray has to be an array with even length`
* `Visualization: Attribute 'placement' contains a not supported value <value>. Supported values are N, NE, E, SE, S, SW, W, NW, Center, auto`. This is the point-label form, where `placement` is an array or `"auto"`.
* `Visualization: Attribute 'placement' is not a supported value. Supported values are Above, Center, Below, AboveCenter`. This is the line-label form, where `placement` is a single string.
* `Visualization: Attribute 'justify' contains a not supported value <value>. Supported values are auto, left, right, center`
* `Visualization: Attribute 'iconOverlap' contains a not supported value <value>. Supported values are never, always, cooperative`
* `<block> '<attribute>' must be of type <type>`. For example, `Style 'isClickable' must be of type boolean` or `label 'padding' must be of type number`. Felt uses this message for the boolean options (`isClickable`, `isHoverable`, `renderAsLines`, `showAboveBasemap`, `antialiasing`), for `minZoom`, `maxZoom` and the label `padding`, and for the popup's `keyAttributes` (array), `titleAttribute` and `imageAttribute` (string).

### Zoom-based values

**Problem**: An [interpolator](/felt-style-language/zoom-based-styling/interpolators.md) is incomplete, or a property that only takes fixed values was given a smooth interpolator.

**Solution**: Give the interpolator its stops (and, for `step`, its first output value; for `exp`, its base). For `lineCap`, `lineJoin` and `dashArray`, use a `step` interpolator.

**Error messages:**

* `Visualization: Linear interpolator: Not enough stops defined`
* `Visualization: Step interpolator: Missing output0`
* `Visualization: Step interpolator: Not enough stops defined`
* `Visualization: Exp interpolator: Missing base value`
* `Visualization: Exp interpolator: Not enough stops defined`
* `Visualization: Attribute '<attribute>' only supports step interpolators`
* `Some of the step values are not a supported value. Supported values are <values>`
* `Some of the step values are not a supported value. Only two-number array values are supported`. This applies to `dashArray`.

### The config block

**Problem**: A value in [the config block](/felt-style-language/style-definition-blocks/the-config-block.md) isn't one Felt supports.

**Solution**: Use one of the values the message lists.

**Error messages:**

* `Visualization 'labelAttribute' has to be a string`
* `Visualization: All values in 'labelAttribute' must be a string`
* `Visualization: Attribute 'aggregation' contains a not supported value <value>. Supported values are count, sum, min, max, mean`
* `Visualization: Attribute 'binMode' contains a not supported value <value>. Supported values are fixed, low, medium, high`. `"auto"` is also accepted, although the message doesn't list it.

### Categorical visualization not working

**Problem**: The style defines a [categorical visualization](/felt-style-language/types-of-visualizations/categorical-visualizations.md), but `categories` or `otherOrder` is set incorrectly.

**Solution**: Set `categories` to an array of values or to a `top`, `bottom` or `all` shortcut, and set `otherOrder` to `"above"` or `"below"`.

**Error messages:**

* `Categories or showOther required`. The `categories` array is empty and `showOther` isn't set.
* `Categories must be an array of strings, numbers or booleans`
* `Categories type must be one of 'top', 'bottom' or 'all'`
* `Categories type "<type>" must have a count`. The `top` and `bottom` shortcuts need a `count`.
* `'showOther' must be one of [above, below]`. Despite the wording, this message refers to the `otherOrder` field. `showOther` itself is a boolean, while `otherOrder` must be `"above"` or `"below"`.

### Numeric visualization not working

**Problem**: The style defines a [numeric visualization](/felt-style-language/types-of-visualizations/numeric-visualizations-color-and-size.md), but `numericAttribute` or `steps` is set incorrectly.

**Solution**: Set `numericAttribute` to a numeric column, and give `steps` at least two values or a valid [classification shortcut](/felt-style-language/classification-methods.md).

**Error messages:**

* `numericAttribute required` (style editor)
* `steps must have at least 2 values`
* `Steps type must be one of 'continuous', 'jenks', 'quantiles', 'equal-intervals', 'stddev' or 'geo-intervals'`
* `Steps type "<type>" must have a count`. Every shortcut except `continuous` needs a `count`.

### Raster visualization not working

**Problem**: A [raster style](/felt-style-language/types-of-visualizations/raster.md) refers to a band that doesn't exist, or its band-math `method` is set incorrectly.

**Solution**: Use band numbers that exist in the raster, starting at 1. Give `method` exactly one of `NDVI`, `NDMI` or `NDWI`, with numeric band indexes for the bands that method needs: `NIR` and `R` for NDVI, `NIR` and `SWIR` for NDMI, and `NIR` and `G` for NDWI.

**Error messages:**

* `Band out of bounds. Valid values are [1, <number of bands>]`
* `Method must be an object`
* `Method must define a single raster algebra op`
* `Method must be one of NDMI, NDVI, NDWI`
* `<method> must be an object`
* `Band <band> is not supported. Must be one of G, NIR, R, SWIR`
* `Band <band> must be a number`
* `"<band>" band is required for <method>`
* `outOfRangeValue must be one of 'color' or 'hide`
* `Raster algebra visualizations only support continuous and equal-intervals steps types`
* `Invalid color inteprolation method. Valid values are "rgb", "hcl"`
* `Visualization: Attribute 'rasterResampling' is not a supported value. Supported values are nearest, linear`
* `rasterResampling property is not supported for categorical rasters`

### Hillshade visualization not working

**Problem**: A [hillshade](/felt-style-language/types-of-visualizations/raster.md#hillshade) value is out of range.

**Solution**: Set `source` (the light direction) between 0 and 359, and `intensity` between 0 and 1.

**Error messages:**

* `Visualization: Attribute 'source' should be a number between 0 and 359`
* `Visualization: Attribute 'intensity' should be a number between 0 and 1`

### Legend, attributes and popup blocks

**Problem**: A value in [the legend](/felt-style-language/legends.md), [attributes](/felt-style-language/style-definition-blocks/the-attributes-block.md) or [popup](/felt-style-language/style-definition-blocks/the-popup-block.md) block has the wrong shape.

**Solution**: Use the shape the message names.

**Error messages:**

* `Legend "displayName" can only be "auto" or an object`
* `Legend "displayName" can only be "auto" when "steps" or "categories" are set`
* `Attribute "<column>" format must be an object`
* `Attribute "<column>" format must be a valid Numbro format`
* `Popup 'popupLayout' must be of type string`
* `Popup 'popupLayout' must be 'table' or 'list'`

### Strict validation (Felt MCP server and AI tools)

**Problem**: The Felt MCP server's style tools and Felt's AI tools reject keys and filters that the editor, REST API and SDK accept without complaint. For example, a misspelled key such as `strokewidth` is ignored by the REST API but rejected here.

**Solution**: Remove or correct the key, palette variable or filter that the message names. See [the filters block](/felt-style-language/style-definition-blocks/the-filters-block.md) for filter syntax.

**Error messages:**

* `Unknown key "<key>". Valid top-level keys are: version, type, config, paint, label, legend, popup, attributes, filters`
* `Unknown key "<key>" in <block>`. The block is `config`, `paint`, `label`, `legend` or `popup`.
* `Unknown key "<key>" in attributes["<column>"]. Valid keys are: displayName, format`
* `Unknown palette variable: <value>`. A `color` or `strokeColor` refers to an `@` palette that doesn't exist.
* `Filter<path>: compound filters must be nested pairs, not a flat list. Use [a, "and", [b, "and", c]] instead of [a, "and", b, "and", c]. Got <filter>`
* `Filter<path>: expected exactly 3 elements ([column, operator, value] or [expr, "and"|"or", expr]), got <count>: <filter>`
* `Filter<path>: unknown operator/logic gate "<operator>". Valid operators are: lt, gt, le, ge, eq, ne, cn, nc, in, ni, is, isnt. Valid logic gates are: and, or. Got <filter>`
* `Filter<path>: operator "<operator>" requires an array value (or null), got <value>`. This applies to `in` and `ni`.
* `Filter<path>: operator "<operator>" only checks for null/existence and requires a null value. To compare against a value, use "eq"/"ne" instead. Got <value>`. This applies to `is` and `isnt`.
* `Filter<path>: operator "<operator>" requires a string, number, boolean, or null value, got <value>`
* `Filter<path>: attribute (first element) must be a string column name or null, got <value>`
* `Filter<path>: expected a [column, operator, value] expression, a [expr, "and"|"or", expr] compound, or null/true/false, got <filter>`

`<path>` is empty for the top-level filter, and locates the nested expression otherwise, for example `[0][2]`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.felt.com/felt-style-language/errors.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
