« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/data/things/cacheable-object.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/data/things/cacheable-object.js b/src/data/things/cacheable-object.js
index c6f154c0..1e7c7aa8 100644
--- a/src/data/things/cacheable-object.js
+++ b/src/data/things/cacheable-object.js
@@ -180,7 +180,8 @@ export default class CacheableObject {
             throw new TypeError(`Validation failed for value ${newValue}`);
           }
         } catch (caughtError) {
-          throw new CacheableObjectPropertyValueError(property, oldValue, newValue, caughtError);
+          throw new CacheableObjectPropertyValueError(
+            property, oldValue, newValue, {cause: caughtError});
         }
       }