ColumnValueException Invalid column value schema for column type: color

My Monday.com integration has been working until recently I’ve started getting the message below:

{"error_code":"ColumnValueException","status_code":200,"error_message":"Invalid column value schema for column type: color. Expected schema is: {\"changed_at\"=\u003e{\"type\"=\u003e[\"string\", \"null\"]}, \"index\"=\u003e{\"type\"=\u003e[\"string\", \"number\", \"null\"]}, \"post_id\"=\u003e{\"type\"=\u003e[\"number\", \"null\"]}, \"label\"=\u003e{\"type\"=\u003e[\"string\", \"number\", \"null\"]}, \"extra_color_index\"=\u003e{\"type\"=\u003e[\"number\"]}}, received: {\"labels\"=\u003e[\"- Select -\"]}","error_data":{"column_value":"{\"labels\"=\u003e[\"- Select -\"]}","column_type":"color"}}

The query mutation is below. I don’t understand why this is now happening when it was working flawlessly for months.


Query:(call) {"query":"mutation {change_multiple_column_values (board_id: 3312041234, item_id: 3417890000, create_labels_if_missing:true, column_values: \"{ \\\"text\\\": \\\"TerraMai Product Management\\\",\\\"status\\\": \\\"Printed\\\",\\\"text8\\\": \\\"Rock Walnut Decking Test\\\",\\\"status_1\\\": \\\"Design\\\",\\\"link5\\\" : {\\\"url\\\" : \\\"http://localhost:81/departments/sales/SampleInsert.aspx?Mode=E&ID=40163\\\", \\\"text\\\": \\\"View Sample\\\" }, \\\"link\\\" : {\\\"url\\\" : \\\"\\\", \\\"text\\\": \\\"Tracking Link\\\" }, \\\"date\\\" : {\\\"date\\\" : \\\"2022-10-24\\\"} , \\\"date0\\\" : {\\\"date\\\" : \\\"2022-10-26\\\"} , \\\"date4\\\" : {\\\"date\\\" : \\\"2022-11-18\\\"} , \\\"ship_method\\\" : {\\\"labels\\\":[\\\"- Select -\\\"]} }\") {id} }"}

Any ideas? Is this a new bug?

hi @bobpotter

I guess this is because the strict validation that started October 11th. It looks like it is failing this validation because the url in your columnId “link” is an empty string.

See also (from monday):

From October 11th, 2022, we’ll be validating the JSON you send to update column values. Sending unexpected values will return an error. For example:

To update an hour column, you must send the hour and minute in 24-hour format.

“{"hour":16,"minute":42}”

If you send an unexpected value, for example:

“{"hour":false}”

You will see an error saying that “hour” should be a number and that the “minute” key is missing.

Validation will not only check for expected keys, but for types as well. Sending a string when an integer is expected will result in an error, for example.

How should I respond to this change?

If you are updating column values, you should confirm you are sending expected values by comparing them to our Column Types Reference here: https://api.developer.monday.com/docs/guide-to-changing-column-data

Thanks for responding. The blank link you reference as the possible error is NOT causing the problem. It’s the last column “ship_method”.

\\\"ship_method\\\" : {\\\"labels\\\":[\\\"- Select -\\\"]}

If I remove this, the query works. This column is a status column with colors. I guess it now want’s a color specified?

Oddly, the query to create the record in Monday looks basically the same and the record get’s created fine. It’s just when updating the Monday record that the error occurs.

ohhh, I see.

I think it is {label: “- Select -”} and not {labels: [“- Select -”]}

See Status

Thanks! Yes. That’s now the correct syntax.