A user receives the generic "An internal server error has occurred" while interacting with a custom Lightning Component. What should the developer do to ensure a more meaningful message?
A.
Add an onerror event handler to the tag.
B.
Add an error-view component to the markup.
C.
Use an AuraHandledException in a try/catch block.
C. is correct due to internal server error vs client side error.
A. might seem like a reasonable approach, but it does not directly address the issue of internal server errors caused by Apex exceptions. An "internal server error" originates from the server-side Apex controller, not the client-side JavaScript code. Since the error happens in Apex, the best way to provide a meaningful error message is inside Apex itself—which is exactly what AuraHandledException does.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
VVeguru
Highly Voted 1 year, 2 months agoBrainMelt12
Most Recent 1 month, 1 week agoJeet89123
4 months, 3 weeks ago