shelving 1.149.1 → 1.149.2
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 +1 -1
- package/util/validate.js +4 -2
package/package.json
CHANGED
package/util/validate.js
CHANGED
|
@@ -14,8 +14,10 @@ export function getValid(value, validator, ErrorConstructor = ValueError, caller
|
|
|
14
14
|
return validator.validate(value);
|
|
15
15
|
}
|
|
16
16
|
catch (thrown) {
|
|
17
|
-
if (thrown instanceof Feedback)
|
|
18
|
-
|
|
17
|
+
if (thrown instanceof Feedback) {
|
|
18
|
+
const { message, ...rest } = thrown;
|
|
19
|
+
throw new ErrorConstructor(message, { ...rest, cause: thrown, caller });
|
|
20
|
+
}
|
|
19
21
|
throw thrown;
|
|
20
22
|
}
|
|
21
23
|
}
|