API Testing · Middle · Question 12 of 75
An endpoint returns 202 Accepted. How should a test continue?
- 1Treat the job as finished, since 202 means success
- 2Fail the test right away, because 202 is an error code
- 3Poll the status endpoint until the job finishes, with a timeout
Show the answer
Correct answer: Poll the status endpoint until the job finishes, with a timeout
Explanation
202 means the work was accepted for later processing. The test checks the final state via a status URL or event.