nerdexam
Salesforce

PDII · Question #16

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?

The correct answer is A. Add an onerror event handler to the tag. See the full explanation below for the reasoning.

Question

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?

Options

  • AAdd an onerror event handler to the tag.
  • BAdd an error-view component to the markup.
  • CUse an AuraHandledException in a try/catch block.
  • DUse ProcessBuilder to catch the error.

How the community answered

(33 responses)
  • A
    79% (26)
  • B
    6% (2)
  • C
    12% (4)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full PDII Practice