Skip to main content

Error Handling

If cacheKey is not added to the cacheKeys.js file, is duplicated, or is not a string or an object with a prefix attribute, the component will display an error component. This is handled by wrapping the component usage in an ErrorBoundaryWrapper.

For the following examples, cacheKeys.js would be defined like this:

// Example src/components/components/column-picker/cache/cacheKeys.js
const CACHE_KEYS = [
"column-picker-demo-key-duplicated", // Assume this one is duplicated
"column-picker-demo", // Assume this one is valid for other demos
"column-picker-demo-key-duplicated", // Assume this one is duplicated
];

export default CACHE_KEYS;

cacheKey not added to cacheKeys.js:

cacheKey duplicated:

cacheKey not a string or an object with a prefix attribute:

Note : if any other error occures, the same error component will be displayed but with a different error message.