200-301 · Question #1066
Which two REST API status-code classes represent errors? (Choose two.)
The correct answer is D. 4XX E. 5XX. In REST APIs, status codes in the 4XX range indicate client-side errors, and codes in the 5XX range signify server-side errors, both representing failure states.
Question
Options
- A1XX
- B2XX
- C3XX
- D4XX
- E5XX
How the community answered
(60 responses)- A2% (1)
- B3% (2)
- C7% (4)
- D88% (53)
Why each option
In REST APIs, status codes in the 4XX range indicate client-side errors, and codes in the 5XX range signify server-side errors, both representing failure states.
The 1XX status code class indicates informational responses, meaning the request was received and understood, and the process is continuing.
The 2XX status code class indicates success, meaning the client's request was successfully received, understood, and accepted.
The 3XX status code class indicates redirection, meaning the client needs to take further action to complete the request, typically by following a new URL.
The 4XX status code class indicates client errors, meaning the client has made a request that cannot be fulfilled, such as a malformed request or invalid authentication.
The 5XX status code class indicates server errors, meaning the server encountered an unexpected condition that prevented it from fulfilling the request.
Concept tested: REST API HTTP status codes
Source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
Topics
Community Discussion
No community discussion yet for this question.