RegisterAutocompleteCallback error when description or another field is done wrong is misleading

While working on an autocomplete feature for a plugin, I’ve noticed that RegisterAutocompleteCallback throws an incorrect error whenever one of its fields is done incorrectly.

An error appears in the console every time you try type: ScriptEditorService: Parsing failed with error Failed to read key "kind", value is not an object, but string, sending default response

I am using the same code as in the documentation for this error, but with description = "test" as a field.

The error is correct but misleading. The value is indeed wrong, but it is not for the key “kind”, which does exist as a separate field.
This can lead to people getting confused when trying Autocomplete for the first time.

1 Like

Thanks for the report! We’ll follow up when we have an update for you.

3 Likes