
Explanation:
The correct HTTP error response for invalid credentials is HTTP 401 (Unauthorized). This status code indicates that the request has not been applied because it lacks valid authentication credentials for the target resource. This is appropriate for scenarios where a user fails to provide valid login credentials. HTTP 404 indicates that the resource could not be found, HTTP 503 indicates server unavailability, and HTTP 505 indicates an HTTP version not supported error.
Ultimate access to all questions.
No comments yet.
When a developer tests an invalid user login in a RESTful application deployed with Amazon API Gateway and AWS Lambda, and encounters an HTTP 405 error, what is the appropriate HTTP error response for invalid credentials?
A
HTTP 401
B
HTTP 404
C
HTTP 503
D
HTTP 505