errorCallback in LWC

errorCallback in LWC

#sfdcsasid #salesforce #errorcallback #lightningwebcomponent #lwc

  • FYI: The errorCallback() is a unique Lightning Web Component used to create an error boundary component that captures errors in all the descendent components in its tree.
  • Impacted Scenario: The error thrown on child component is not accessible on parent component.
Parent .html

Parent .js

Parent .js-meta.xml

Child .html

Child .js

Child .js-meta.xml

Reference Contact

Parent Component UI - without error
  • Resolution: We have added the errorCallback to parent component, where we have assigned the error values.
Parent .js

Parent Component UI - with error
Please share your feedback or comments or queries related to this post, on below comment section.

Comments