Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Salesforce Certified Platform Developer II (PDII) · Salesforce
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
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.
We want to show more meaningfull message
C, AuraHandled Exception is used to track the error when Apex is interacting with Lightning Component