AWS Certified Developer Associate DVA-C02 Practice Question
When a user attempts to access a resource on an application but is unauthorized due to the application's lack of correct authentication credentials, which HTTP status code should the application return to the user's browser?
The correct answer is 401 Unauthorized. This status code indicates that the request has not been applied because it lacks valid authentication credentials for the target resource. The other codes listed are incorrect because 404 implies that a resource is not found, 400 indicates a bad request from the client that the server could not process, and 500 signifies an internal server error, none of which are appropriate responses for an authentication issue.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the 401 Unauthorized status code specifically imply?
Open an interactive chat with Bash
How does the 401 status code differ from the 403 Forbidden status code?
Open an interactive chat with Bash
When should a developer use the 401 status code in their application?
Open an interactive chat with Bash
AWS Certified Developer Associate DVA-C02
Troubleshooting and Optimization
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Oh snap!
Loading...
Loading...
Loading...
Information Technology Package Join Premium for Full Access