Multiple choice technology security

What exception is thrown by the security API when a user attempts to access a resource that they are not authorized for?

  1. SecurityException

  2. AccessException

  3. AuthenitcationException

  4. Exception

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

When a user attempts to access a resource without proper authorization, the security API throws a SecurityException. This exception is specifically designed to indicate that the caller lacks the required permissions or rights to perform the requested operation. Generic exceptions like Exception are too broad, and AccessException is not a standard exception type in most security frameworks.