-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throw error on invalid @track
/@api
fields
#3408
Comments
@track
/@api
fields@track
/@api
fields
There are also cases where the wire name is invalid, and currently we log but should throw. |
@track
/@api
fields@track
/@api
fields
We have an Investigation where in debug mode, a flexipage fails to render at all if there is an LWC error (duplicate property). This happens because register.validateObservedField is throwing an error. In this change we changed it to log-only, and now the page at least can render, and the error is logged. However, there is a comment saying we should change the log to throw. But if we do that, the problem will resurface. It is a very bad user experience to hose the entire flexipage for an error in an included LWC. So my hope is that we do not throw an Error, or throw it in such a way that it doesn't hork the entire page. Ravi and I looked at it for a while and don't thing there is a good way to achieve this, but maybe its possible to do. If not, I think we should continue to log-only. |
For now, we will definitely do log-only, yeah. This is in our breaking changes wishlist (#2964), so we definitely acknowledge that it would be a breaking change to change this behavior in prod mode. It may be possible to do with API versioning. |
Thanks Nolan! Even in debug mode, the result of a completely broken flexipage is no bueno. |
Yep, that was exactly the point of 4a66fe4 😃 |
E.g. in this class:
... today we don't throw an error in prod mode (or the compiler), but we should. This would be a backwards-incompatible change.
Related: #2515 W-9927596
The text was updated successfully, but these errors were encountered: