Question 2 of 5

Why is testing an AI service with successful responses alone insufficient?

The helper correctly displays a prepared retry delay. When connected to a client, it encounters timeouts and received responses with unsupported values.

Imagine two empty search screens. In one case the service returned an empty list in a successful response. In the other, the connection dropped before any response arrived. “No matches” makes sense on the first screen. On the second, the app still has no way to tell whether matches exist.

WHERE TO START

What would you check first if the service returned an empty response?

What to know before this question
Topic example · Response status

Change 200 to 404. What will the program print?

status = 200
print(status == 200)
Line notes
  1. Store a service response code.
  2. Compare the code with 200 and print the result.

How would you rate your understanding?

This is your self-assessment. Progress is saved in this browser.

Not rated yet

← Back to Python and APIs