> 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

Style validation errors surface as a banner in the in-app style editor, and as `422` responses with the message in the error `detail` when styling [via the REST API](/rest-api/errors-and-rate-limits.md). The JS SDK rejects the `setLayerStyle` promise with the validation message.

### Unexpected value or type

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

**Solution**: Change the value to be valid.

**Error messages:**

* Attribute `'displayName'` on a legend item of type simple must be a string.
* Attribute `attribute_name` is not a number.
* Attribute `attribute_name` is not a string.
* Attribute `'lineCap'` is not a supported value. Supported values are butt, round, square.
* Attribute `'lineJoin'` is not a supported value. Supported values are bevel, round, miter.
* Visualization dashArray has to be an array with even length.
* Attribute '`offset'` must be either an array of numbers or a number.
* Attribute `'placement'` contains a not supported value. Supported values are `N`, `NE`, `E`, `SE`, `S`, `SW`, `W`, `NW`, `Center`.
* Attribute `'placement'` contains a not supported value. Supported values are `Above`, `Center`, `Below`.
* All values in `'labelAttribute'` must be a string.
* Visualization `'type'` definition must be one of `simple`, `categorical`, `numeric`, `heatmap`, `hillshade`, `h3`.
* Attribute `'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"`.)

### Categorical visualization not working

**Problem**: The style defines a categorical visualization, but the maps are not showing the layer

**Error messages:**

* Categories required. A `categories` array must be defined in the *config* block when defining a categorical visualization. Read more about categorical visualizations [here](/felt-style-language/types-of-visualizations/categorical-visualizations.md).
* Not enough or too many `attribute_name` values. When defining a categorical visualization, all style and label properties must be an array with either a single value that will apply to all categories or an array with as many values as categories defined in the config block. Read more about categorical visualizations [here](/felt-style-language/types-of-visualizations/categorical-visualizations.md).


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
