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): the request fails with422. The error has the titleInvalid style formatand the detailThe provided style is an invalid Felt Style Language document. The individual validation messages are in that error's ownerrorsarray:{ "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:
setLayerStylerejects with anErrorwhose 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 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.
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 stringStyle '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.1Visualization has an invalid type. Thetypemust be one ofsimple,categorical,numeric,heatmap,hillshadeorh3.
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 and the label block for each property's accepted values.
Error messages:
Visualization: Attribute '<attribute>' is not a number. Applies tostrokeWidth,opacity,haloWidth,lineHeight,letterSpacing,maxLineChars,repeatDistanceandoffset.Visualization: Attribute '<attribute>' is not a string. Applies tocolor,strokeColor,highlightColor,highlightStrokeColor, and the labelcolor,haloColor,fontStyleandtextTransform.Visualization: Attribute 'size' is not a number or stringVisualization: Attribute 'fontSize' is not a number or an objectVisualization: Attribute 'lineCap' is not a supported value. Supported values are butt, round, squareVisualization: Attribute 'lineJoin' is not a supported value. Supported values are bevel, round, miterVisualization dashArray has to be an array with even lengthVisualization: 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, whereplacementis 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, whereplacementis a single string.Visualization: Attribute 'justify' contains a not supported value <value>. Supported values are auto, left, right, centerVisualization: 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 booleanorlabel 'padding' must be of type number. Felt uses this message for the boolean options (isClickable,isHoverable,renderAsLines,showAboveBasemap,antialiasing), forminZoom,maxZoomand the labelpadding, and for the popup'skeyAttributes(array),titleAttributeandimageAttribute(string).
Zoom-based values
Problem: An interpolator 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 definedVisualization: Step interpolator: Missing output0Visualization: Step interpolator: Not enough stops definedVisualization: Exp interpolator: Missing base valueVisualization: Exp interpolator: Not enough stops definedVisualization: Attribute '<attribute>' only supports step interpolatorsSome 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 todashArray.
The config block
Problem: A value in the config block isn't one Felt supports.
Solution: Use one of the values the message lists.
Error messages:
Visualization 'labelAttribute' has to be a stringVisualization: All values in 'labelAttribute' must be a stringVisualization: Attribute 'aggregation' contains a not supported value <value>. Supported values are count, sum, min, max, meanVisualization: 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, 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. Thecategoriesarray is empty andshowOtherisn't set.Categories must be an array of strings, numbers or booleansCategories type must be one of 'top', 'bottom' or 'all'Categories type "<type>" must have a count. Thetopandbottomshortcuts need acount.'showOther' must be one of [above, below]. Despite the wording, this message refers to theotherOrderfield.showOtheritself is a boolean, whileotherOrdermust be"above"or"below".
Numeric visualization not working
Problem: The style defines a numeric visualization, 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.
Error messages:
numericAttribute required(style editor)steps must have at least 2 valuesSteps type must be one of 'continuous', 'jenks', 'quantiles', 'equal-intervals', 'stddev' or 'geo-intervals'Steps type "<type>" must have a count. Every shortcut exceptcontinuousneeds acount.
Raster visualization not working
Problem: A raster style 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 objectMethod must define a single raster algebra opMethod must be one of NDMI, NDVI, NDWI<method> must be an objectBand <band> is not supported. Must be one of G, NIR, R, SWIRBand <band> must be a number"<band>" band is required for <method>outOfRangeValue must be one of 'color' or 'hideRaster algebra visualizations only support continuous and equal-intervals steps typesInvalid color inteprolation method. Valid values are "rgb", "hcl"Visualization: Attribute 'rasterResampling' is not a supported value. Supported values are nearest, linearrasterResampling property is not supported for categorical rasters
Hillshade visualization not working
Problem: A 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 359Visualization: Attribute 'intensity' should be a number between 0 and 1
Legend, attributes and popup blocks
Problem: A value in the legend, attributes or popup block has the wrong shape.
Solution: Use the shape the message names.
Error messages:
Legend "displayName" can only be "auto" or an objectLegend "displayName" can only be "auto" when "steps" or "categories" are setAttribute "<column>" format must be an objectAttribute "<column>" format must be a valid Numbro formatPopup 'popupLayout' must be of type stringPopup '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 for filter syntax.
Error messages:
Unknown key "<key>". Valid top-level keys are: version, type, config, paint, label, legend, popup, attributes, filtersUnknown key "<key>" in <block>. The block isconfig,paint,label,legendorpopup.Unknown key "<key>" in attributes["<column>"]. Valid keys are: displayName, formatUnknown palette variable: <value>. AcolororstrokeColorrefers 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 toinandni.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 toisandisnt.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].
Last updated
Was this helpful?