You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect the given schema to detect the error.
Platform (please complete the following information):
Firefox 124
Additional context
My use case is that I want to build a schema to detect an error thrown by a specific library. The library seems to construct errors with Object.assign(new Error, { ... }), so I can't use instanceof to differentiate from other thrown errors.
The text was updated successfully, but these errors were encountered:
Describe the bug
When I use Yup to try to check if an
Error
is an object, it seems to fail, even if all the fields exist.To Reproduce
Expected behavior
I would expect the given schema to detect the error.
Platform (please complete the following information):
Firefox 124
Additional context
My use case is that I want to build a schema to detect an error thrown by a specific library. The library seems to construct errors with
Object.assign(new Error, { ... })
, so I can't useinstanceof
to differentiate from other thrown errors.The text was updated successfully, but these errors were encountered: