If a user selects a cell with a primitive value, the call to cache.get throws an "invalid value used as WeakMap key" error. I think it's more informative to show "invalid data source" in that case, and in general I'd like to standardize the error message across all cases where the data source isn't valid.
Companion PR to https://github.com/observablehq/observablehq/pull/12427
If a user selects a cell with a primitive value, the call to
cache.get
throws an "invalid value used as WeakMap key" error. I think it's more informative to show "invalid data source" in that case, and in general I'd like to standardize the error message across all cases where the data source isn't valid.