datajunction-ui 0.0.137 → 0.0.139
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -286,6 +286,14 @@ export function QueryPlannerPage() {
|
|
|
286
286
|
setDimensionsLoading(true);
|
|
287
287
|
try {
|
|
288
288
|
const dims = await djClient.commonDimensions(selectedMetrics);
|
|
289
|
+
// Server returns an error body (e.g. {message: "..."}) on 404/422 with
|
|
290
|
+
// a non-OK status, but commonDimensions() doesn't surface that — guard
|
|
291
|
+
// against passing a non-array into setCommonDimensions.
|
|
292
|
+
if (!Array.isArray(dims)) {
|
|
293
|
+
console.error('commonDimensions returned non-array:', dims);
|
|
294
|
+
setCommonDimensions([]);
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
289
297
|
setCommonDimensions(dims);
|
|
290
298
|
|
|
291
299
|
// Apply pending dimensions from URL if we have them
|