diff --git a/lib/Onyx.js b/lib/Onyx.js index 77bfbdf04..75a8c8bcc 100644 --- a/lib/Onyx.js +++ b/lib/Onyx.js @@ -500,6 +500,11 @@ function remove(key) { function evictStorageAndRetry(error, onyxMethod, ...args) { logInfo(`Handled error: ${error}`); + if (error && Str.startsWith(error.message, 'Failed to execute \'put\' on \'IDBObjectStore\'')) { + logAlert('Attempted to set invalid data set in Onyx. Please ensure all data is serializable.'); + throw error; + } + // Find the first key that we can remove that has no subscribers in our blocklist const keyForRemoval = _.find(recentlyAccessedKeys, key => !evictionBlocklist[key]);